From 741e8ae464c7938773008f346c869da266ad35fa Mon Sep 17 00:00:00 2001 From: TroyHernandez Date: Tue, 11 Aug 2026 05:53:34 -0500 Subject: [PATCH 1/3] Fix README rendering and dispatcher arg validation for announcement traffic - Close the unclosed fence after the Z-Image example: the whole LTX section rendered inside a code block on the CRAN page, and the dispatcher one-liner rendered outside one (now its own block). - Point cat2.png / gambling_cat.png embeds at raw.githubusercontent URLs; both files are .Rbuildignore'd, so the relative refs 404 on the CRAN-rendered README. - Replace the LTX example with the working call shape (mirrors R/serve.R): ltx23_load_pipeline() has no checkpoint_path default and txt2vid_ltx2() needs text_encoder + tokenizer. Also fp8 -> nf4 in the download comment (nf4 is the default since 0.2.2). - match.arg() in txt2img() and img2img(): bare txt2img("a cat") errored with "EXPR must be a length 1 vector", img2img errored on the length-2 vector condition. Both now default to sd21, with a tinytest covering the rejection message. --- R/img2img.R | 1 + R/txt2img.R | 1 + README.md | 16 +++++++++++----- inst/tinytest/test_dispatch.R | 8 ++++++++ 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 inst/tinytest/test_dispatch.R diff --git a/R/img2img.R b/R/img2img.R index 4bf3402..7022107 100644 --- a/R/img2img.R +++ b/R/img2img.R @@ -39,6 +39,7 @@ img2img <- function(input_image, prompt, negative_prompt = NULL, use_native_decoder = FALSE, use_native_text_encoder = FALSE, use_native_unet = FALSE, ...) { + model_name <- match.arg(model_name) if (model_name %in% c("sd21", "sdxl")) { num_train_timesteps <- 1000 } else { diff --git a/R/txt2img.R b/R/txt2img.R index 3384fc1..0b4f2c9 100644 --- a/R/txt2img.R +++ b/R/txt2img.R @@ -14,6 +14,7 @@ txt2img <- function(prompt, model_name = c("sd21", "sdxl", "flux1", "flux2", "zimage"), ...) { + model_name <- match.arg(model_name) switch(model_name, # "sd15" = txt2img_sd15(prompt, ...), "sd21" = txt2img_sd21(prompt, ...), diff --git a/README.md b/README.md index b921baf..17e2b2e 100644 --- a/README.md +++ b/README.md @@ -143,8 +143,8 @@ gambling_cat <- img2img( pipeline <- NULL torch::cuda_empty_cache() ``` -![](cat2.png) -![](gambling_cat.png) +![](https://raw.githubusercontent.com/cornball-ai/diffuseR/main/cat2.png) +![](https://raw.githubusercontent.com/cornball-ai/diffuseR/main/gambling_cat.png) ### FLUX and Z-Image @@ -176,6 +176,7 @@ txt2img_flux2("a red fox sitting in a snowy forest, digital art", download_zimage_turbo() txt2img_zimage(paste("A storefront with a large wooden sign that reads", "\"DIFFUSER\" in bold carved letters"), seed = 42) +``` ### Text-to-Video: LTX-2.3 @@ -185,10 +186,14 @@ steps. NF4-quantized it renders 768x512x49 in ~44s warm on an RTX are supported (see ?txt2vid_ltx2). ```r -download_ltx2() # ~46GB download, one-time fp8 quantize +paths <- download_ltx2() # ~46GB download, one-time nf4 quantize +pipe <- ltx23_load_pipeline(paths$artifact_dir) +te <- load_gemma3_text_encoder(paths$text_encoder_dir, device = "cpu") +tok <- gemma3_tokenizer(dirname(hfhub::hub_download("Lightricks/LTX-2", + "tokenizer/tokenizer.json"))) txt2vid_ltx2("A river winding through a misty forest at dawn", - pipeline = ltx23_load_pipeline(), - filename = "river.mp4") + pipeline = pipe, text_encoder = te, tokenizer = tok, + num_frames = 73L, seed = 11L, filename = "river.mp4") ``` ### Serving over HTTP @@ -201,6 +206,7 @@ serve(model = "flux2", port = 7812L, token = "my-secret") # http://localhost:7812/v1/images/generations ``` +```r # Or through the common dispatcher txt2img("a lighthouse at dusk", model_name = "flux2") ``` diff --git a/inst/tinytest/test_dispatch.R b/inst/tinytest/test_dispatch.R new file mode 100644 index 0000000..1aa37b4 --- /dev/null +++ b/inst/tinytest/test_dispatch.R @@ -0,0 +1,8 @@ +# Dispatcher argument validation: an unknown model_name must fail fast +# with match.arg's message instead of reaching switch() or a vector +# if() condition (bare txt2img("prompt") used to error with "EXPR must +# be a length 1 vector"; img2img errored on the length-2 default). + +expect_error(txt2img("a cat", model_name = "nope"), "should be one of") +expect_error(img2img("cat.png", "a cat", model_name = "nope"), + "should be one of") From 52637c9d91950510e72eedf7fdca5b07e20e7140 Mon Sep 17 00:00:00 2001 From: TroyHernandez Date: Tue, 11 Aug 2026 05:54:42 -0500 Subject: [PATCH 2/3] rformat + document --- R/download_ltx23.R | 16 +++--- R/quantize_flux.R | 3 +- R/recommend.R | 8 +-- R/resident.R | 36 ++++++------- R/st_caps.R | 3 +- R/txt2img_flux2.R | 3 +- R/txt2img_zimage.R | 3 +- man/CLIPTokenizer.Rd | 10 ++-- man/SpatialTransformer.Rd | 8 ++- man/VAEUpBlock.Rd | 9 +++- man/convert_sd21_pt_to_diffusers.Rd | 8 ++- man/ddim_scheduler_create.Rd | 18 ++++--- man/ddim_scheduler_step.Rd | 22 +++++--- man/dot-ltx23_jit_run_stack.Rd | 31 +++++++---- man/download_component.Rd | 9 +++- man/download_flux1.Rd | 9 +++- man/download_flux2_klein.Rd | 9 +++- man/download_ltx2.Rd | 9 +++- man/download_model.Rd | 12 +++-- man/download_zimage_turbo.Rd | 9 +++- man/encode_bpe.Rd | 11 +++- man/encode_qwen.Rd | 9 +++- man/encode_with_gemma3.Rd | 12 +++-- man/encode_with_qwen3.Rd | 10 +++- man/encode_with_t5.Rd | 9 +++- man/flowmatch_calculate_shift.Rd | 9 +++- man/flowmatch_scheduler_create.Rd | 18 ++++--- man/flowmatch_scheduler_step.Rd | 9 +++- man/flowmatch_set_timesteps.Rd | 10 +++- man/flux2_double_block.Rd | 10 +++- man/flux2_load_pipeline.Rd | 14 +++-- man/flux2_parallel_self_attention.Rd | 10 +++- man/flux2_single_block.Rd | 10 +++- man/flux2_transformer.Rd | 20 ++++--- man/flux2_vae_decoder.Rd | 7 ++- man/flux_attention.Rd | 11 +++- man/flux_load_pipeline.Rd | 13 +++-- man/flux_load_transformer.Rd | 11 +++- man/flux_quantize.Rd | 10 +++- man/flux_transformer.Rd | 15 ++++-- man/gemma3_encode_batch.Rd | 13 +++-- man/gemma3_quantize_nf4.Rd | 9 +++- man/gemma3_rotary_embedding.Rd | 8 ++- man/img2img.Rd | 30 ++++++++--- man/load_flux2_vae_decoder.Rd | 10 ++-- man/load_gemma3_nf4.Rd | 9 +++- man/load_gemma3_text_encoder.Rd | 10 ++-- man/load_model_component.Rd | 10 +++- man/load_pipeline.Rd | 13 +++-- man/load_qwen3_text_encoder.Rd | 9 +++- man/load_t5_text_encoder.Rd | 9 +++- man/ltx23_attention.Rd | 17 ++++-- man/ltx23_audio_causal_conv2d.Rd | 9 +++- man/ltx23_audio_decoder.Rd | 13 +++-- man/ltx23_audio_encoder.Rd | 11 ++-- man/ltx23_audio_mel_frontend.Rd | 11 ++-- man/ltx23_audio_resnet_block.Rd | 7 ++- man/ltx23_audio_vae.Rd | 14 +++-- man/ltx23_causal_conv3d.Rd | 9 +++- man/ltx23_connector_transformer_1d.Rd | 18 ++++--- man/ltx23_get_timestep_embedding.Rd | 9 +++- man/ltx23_latent_upsampler.Rd | 7 ++- man/ltx23_load_group.Rd | 10 +++- man/ltx23_load_pipeline.Rd | 16 ++++-- man/ltx23_load_transformer_fp8.Rd | 9 +++- man/ltx23_mel_stft.Rd | 8 ++- man/ltx23_nf4_dequantize.Rd | 10 +++- man/ltx23_prepare_conditioned_latents.Rd | 10 +++- man/ltx23_quantize_fp8.Rd | 9 +++- man/ltx23_quantize_nf4.Rd | 9 +++- man/ltx23_rotary_pos_embed.Rd | 24 ++++++--- man/ltx23_rotary_pos_embed_1d.Rd | 11 ++-- man/ltx23_text_connectors.Rd | 36 +++++++------ man/ltx23_transformer.Rd | 55 +++++++++++++------- man/ltx23_transformer_block.Rd | 26 ++++++--- man/ltx23_tune_gc.Rd | 2 +- man/ltx23_upsample1d.Rd | 8 ++- man/ltx23_video_decoder3d.Rd | 24 +++++---- man/ltx23_video_down_block3d.Rd | 13 +++-- man/ltx23_video_downsampler3d.Rd | 8 ++- man/ltx23_video_encoder3d.Rd | 20 ++++--- man/ltx23_video_mid_block3d.Rd | 8 ++- man/ltx23_video_resnet_block3d.Rd | 8 ++- man/ltx23_video_up_block3d.Rd | 16 ++++-- man/ltx23_video_upsampler3d.Rd | 9 +++- man/ltx23_video_vae.Rd | 36 ++++++++----- man/ltx23_vocoder.Rd | 19 ++++--- man/ltx23_vocoder_resblock.Rd | 9 +++- man/ltx23_vocoder_with_bwe.Rd | 35 ++++++++----- man/models2devices.Rd | 8 ++- man/qwen3_encoder.Rd | 15 ++++-- man/recommend.Rd | 8 ++- man/reshard_safetensors.Rd | 9 +++- man/resident_load.Rd | 8 ++- man/save_video.Rd | 11 +++- man/save_video_ffmpeg.Rd | 10 +++- man/save_video_ltx23.Rd | 10 +++- man/sd_pipeline_from_safetensors.Rd | 9 +++- man/sdxl_pipeline_from_safetensors.Rd | 8 ++- man/serve.Rd | 18 +++++-- man/t5_encoder.Rd | 15 ++++-- man/text_encoder2_native.Rd | 12 +++-- man/text_encoder2_native_from_safetensors.Rd | 8 ++- man/text_encoder_native.Rd | 15 ++++-- man/text_encoder_native_from_safetensors.Rd | 8 ++- man/timestep_embedding.Rd | 8 ++- man/tokenize_gemma3.Rd | 9 +++- man/txt2img.Rd | 6 ++- man/txt2img_flux.Rd | 19 +++++-- man/txt2img_flux2.Rd | 18 +++++-- man/txt2img_sd21.Rd | 30 ++++++++--- man/txt2img_sdxl.Rd | 33 +++++++++--- man/txt2img_zimage.Rd | 18 +++++-- man/txt2vid_ltx2.Rd | 47 ++++++++++++----- man/unet_native.Rd | 12 +++-- man/unet_sdxl_native.Rd | 17 +++--- man/vae_decoder_native.Rd | 8 ++- man/vae_decoder_native_from_safetensors.Rd | 8 ++- man/zimage_load_pipeline.Rd | 14 +++-- man/zimage_transformer.Rd | 19 +++++-- man/zimage_unpatchify.Rd | 9 +++- 121 files changed, 1160 insertions(+), 453 deletions(-) diff --git a/R/download_ltx23.R b/R/download_ltx23.R index 344e4c8..2a266be 100644 --- a/R/download_ltx23.R +++ b/R/download_ltx23.R @@ -70,8 +70,8 @@ NULL #' #' @export download_ltx2 <- function(quantize = TRUE, precision = c("nf4", "fp8"), - output_dir = NULL, - text_encoder = TRUE, verbose = TRUE) { + output_dir = NULL, text_encoder = TRUE, + verbose = TRUE) { if (!requireNamespace("hfhub", quietly = TRUE)) { stop("The hfhub package is required to download model weights.") } @@ -83,7 +83,11 @@ download_ltx2 <- function(quantize = TRUE, precision = c("nf4", "fp8"), output_dir <- file.path(tools::R_user_dir("diffuseR", "data"), paste0("ltx2.3-", precision)) } - art_gb <- if (identical(precision, "fp8")) 26 else 19 + if (identical(precision, "fp8")) { + art_gb <- 26 + } else { + art_gb <- 19 + } result <- list(checkpoint = NULL, artifact_dir = output_dir, precision = precision, fp8_dir = if (identical(precision, "fp8")) output_dir, @@ -109,9 +113,9 @@ download_ltx2 <- function(quantize = TRUE, precision = c("nf4", "fp8"), free, precision, 46 + art_gb)) } ok <- .ltx23_consent(sprintf(paste0( - "the LTX-2.3 distilled checkpoint (46 GB) plus a ~%d GB local %s ", - "artifact from HuggingFace (weights under the LTX-2 Community License)"), - art_gb, precision)) + "the LTX-2.3 distilled checkpoint (46 GB) plus a ~%d GB local %s ", + "artifact from HuggingFace (weights under the LTX-2 Community License)"), + art_gb, precision)) if (!ok) { stop("Download cancelled.", call. = FALSE) } diff --git a/R/quantize_flux.R b/R/quantize_flux.R index f75d248..7f36d64 100644 --- a/R/quantize_flux.R +++ b/R/quantize_flux.R @@ -97,8 +97,7 @@ NULL zimage = list(repo = .zimage_repo, files = .zimage_transformer_files, fn = "download_zimage_turbo"), - stop("No bf16 source known for model '", model, "'", - call. = FALSE)) + stop("No bf16 source known for model '", model, "'", call. = FALSE)) paths <- lapply(spec$files, function(f) { tryCatch(hfhub::hub_download(spec$repo, f, local_files_only = TRUE), error = function(e) NULL) diff --git a/R/recommend.R b/R/recommend.R index bc0d626..7f2f427 100644 --- a/R/recommend.R +++ b/R/recommend.R @@ -132,10 +132,10 @@ recommend <- function(model = c("sd21", "sdxl", "flux1", "flux2", "zimage", host_ram_gb = host_ram_gb, fork_suggested = fork, note = if (fork) { - .st_fork_note(want$precision) - } else { - .bf16_note(model, chosen$precision) - } + .st_fork_note(want$precision) + } else { + .bf16_note(model, chosen$precision) + } ) } diff --git a/R/resident.R b/R/resident.R index 32f1fc0..ed532e2 100644 --- a/R/resident.R +++ b/R/resident.R @@ -126,16 +126,18 @@ # as.character() on a torch_dtype returns ("Float", "Half", "Byte", # "Long", ...), NOT the R constructor alias. Unknown dtypes fall back to # 4, which only affects a reported number. -.dtype_widths <- c(double = 8, long = 8, complexfloat = 8, - float = 4, int = 4, - half = 2, bfloat16 = 2, short = 2, - byte = 1, char = 1, bool = 1, - float8_e4m3fn = 1, float8_e5m2 = 1) +.dtype_widths <- c(double = 8, long = 8, complexfloat = 8, float = 4, + int = 4, half = 2, bfloat16 = 2, short = 2, byte = 1, + char = 1, bool = 1, float8_e4m3fn = 1, float8_e5m2 = 1) .dtype_bytes <- function(dtype) { nm <- tolower(tryCatch(as.character(dtype), error = function(e) "")) w <- .dtype_widths[[nm, exact = TRUE]] - if (is.null(w)) 4 else w + if (is.null(w)) { + 4 + } else { + w + } } #' TRUE when every staged tensor sits on the expected device type @@ -149,7 +151,8 @@ .resident_all_on <- function(staging, type) { for (st in staging) { for (pair in st) { - dev <- tryCatch(pair$live$device$type, error = function(e) NA_character_) + dev <- tryCatch(pair$live$device$type, + error = function(e) NA_character_) if (!identical(dev, type)) { return(FALSE) } @@ -192,8 +195,9 @@ stop("cannot ", verb, ": this handle is unloaded", call. = FALSE) } if (identical(res$state, "broken")) { - stop("cannot ", verb, ": this handle is broken (", res$last_error %||% - "no detail recorded", "). Only resident_status() and ", + stop("cannot ", verb, ": this handle is broken (", + res$last_error %||% "no detail recorded", + "). Only resident_status() and ", "resident_unload() work from here.", call. = FALSE) } invisible(TRUE) @@ -324,7 +328,7 @@ resident_load <- function(model = c("flux2", "flux1", "zimage", "ltx"), free_gb <- tryCatch(.detect_vram(use_free = TRUE), error = function(e) NA_real_) } - need_gb <- res$pinned_bytes / 1024^3 + need_gb <- res$pinned_bytes / 1024 ^ 3 if (!is.na(free_gb) && free_gb > 0 && need_gb > free_gb) { stop(sprintf(paste0("%s needs %.2f GB resident but only %.2f GB of ", "VRAM is free. Load the pipeline with ", @@ -532,15 +536,11 @@ resident_generate <- function(res, prompt, ...) { resident_status <- function(res) { stopifnot(inherits(res, "diffuseR_resident")) mem <- .cuda_bytes() - list(model = res$model, - state = res$state, - device = res$device, + list(model = res$model, state = res$state, device = res$device, components = names(res$staging), components_on_gpu = .resident_on_gpu_count(res$staging), - pinned_bytes = res$pinned_bytes, - gpu_allocated = mem$allocated, - gpu_reserved = mem$reserved, - loaded_at = res$loaded_at, + pinned_bytes = res$pinned_bytes, gpu_allocated = mem$allocated, + gpu_reserved = mem$reserved, loaded_at = res$loaded_at, last_error = res$last_error) } @@ -623,5 +623,5 @@ print.diffuseR_resident <- function(x, ...) { if (is.null(b) || is.na(b) || b <= 0) { return("0 GB") } - sprintf("%.2f GB", b / 1024^3) + sprintf("%.2f GB", b / 1024 ^ 3) } diff --git a/R/st_caps.R b/R/st_caps.R index 301b49e..f546b8b 100644 --- a/R/st_caps.R +++ b/R/st_caps.R @@ -113,8 +113,7 @@ NULL } else { sprintf("%s needs", precision) } - sprintf(paste0( - "%s a safetensors newer than the one on CRAN: %s is ", + sprintf(paste0("%s a safetensors newer than the one on CRAN: %s is ", "merged upstream but not yet released. Install the ", "development version from the mlverse/safetensors ", "repository on GitHub, or press on with nf4: same ", diff --git a/R/txt2img_flux2.R b/R/txt2img_flux2.R index 2bd22d5..b52b915 100644 --- a/R/txt2img_flux2.R +++ b/R/txt2img_flux2.R @@ -67,8 +67,7 @@ flux2_load_pipeline <- function(model_dir = NULL, device = "cuda", } if (is.null(model_dir)) { model_dir <- .flux_model_dir("flux2", precision, - file.path(tools::R_user_dir("diffuseR", "data"), - "flux2-klein-4b-")) + file.path(tools::R_user_dir("diffuseR", "data"), "flux2-klein-4b-")) } ckpt <- if (file.exists(file.path(model_dir, "manifest.json"))) { diff --git a/R/txt2img_zimage.R b/R/txt2img_zimage.R index c2179f3..486a674 100644 --- a/R/txt2img_zimage.R +++ b/R/txt2img_zimage.R @@ -68,8 +68,7 @@ zimage_load_pipeline <- function(model_dir = NULL, device = "cuda", } if (is.null(model_dir)) { model_dir <- .flux_model_dir("zimage", precision, - file.path(tools::R_user_dir("diffuseR", "data"), - "zimage-turbo-")) + file.path(tools::R_user_dir("diffuseR", "data"), "zimage-turbo-")) } ckpt <- if (file.exists(file.path(model_dir, "manifest.json"))) { diff --git a/man/CLIPTokenizer.Rd b/man/CLIPTokenizer.Rd index 37fc454..cddad68 100644 --- a/man/CLIPTokenizer.Rd +++ b/man/CLIPTokenizer.Rd @@ -3,10 +3,12 @@ \alias{CLIPTokenizer} \title{Tokenize a prompt} \usage{ -CLIPTokenizer(prompt, - merges = system.file("tokenizer/merges.txt", package = "diffuseR"), - vocab_file = system.file("tokenizer/vocab.json", package = "diffuseR"), - pad_token = 0L) +CLIPTokenizer( + prompt, + merges = system.file("tokenizer/merges.txt", package = "diffuseR"), + vocab_file = system.file("tokenizer/vocab.json", package = "diffuseR"), + pad_token = 0L +) } \arguments{ \item{prompt}{A character string prompt describing the image to generate.} diff --git a/man/SpatialTransformer.Rd b/man/SpatialTransformer.Rd index 5d228ad..c38333c 100644 --- a/man/SpatialTransformer.Rd +++ b/man/SpatialTransformer.Rd @@ -3,7 +3,13 @@ \alias{SpatialTransformer} \title{Spatial Transformer (Attention Block)} \usage{ -SpatialTransformer(in_channels, n_heads, d_head, depth = 1L, context_dim = NULL) +SpatialTransformer( + in_channels, + n_heads, + d_head, + depth = 1L, + context_dim = NULL +) } \description{ Spatial Transformer (Attention Block) diff --git a/man/VAEUpBlock.Rd b/man/VAEUpBlock.Rd index 5660e67..8464e40 100644 --- a/man/VAEUpBlock.Rd +++ b/man/VAEUpBlock.Rd @@ -3,8 +3,13 @@ \alias{VAEUpBlock} \title{VAE Up Block} \usage{ -VAEUpBlock(in_channels, out_channels, num_resnets = 3, add_upsample = TRUE, - norm_groups = 32) +VAEUpBlock( + in_channels, + out_channels, + num_resnets = 3, + add_upsample = TRUE, + norm_groups = 32 +) } \arguments{ \item{in_channels}{Input channels} diff --git a/man/convert_sd21_pt_to_diffusers.Rd b/man/convert_sd21_pt_to_diffusers.Rd index e8fb0cf..49606b2 100644 --- a/man/convert_sd21_pt_to_diffusers.Rd +++ b/man/convert_sd21_pt_to_diffusers.Rd @@ -3,8 +3,12 @@ \alias{convert_sd21_pt_to_diffusers} \title{Convert cornball SD 2.1 TorchScript weights to a diffusers artifact} \usage{ -convert_sd21_pt_to_diffusers(pt_dir = NULL, output_dir = NULL, - dtype = c("float16", "float32"), verbose = TRUE) +convert_sd21_pt_to_diffusers( + pt_dir = NULL, + output_dir = NULL, + dtype = c("float16", "float32"), + verbose = TRUE +) } \arguments{ \item{pt_dir}{Directory holding \code{unet-cpu.pt}, diff --git a/man/ddim_scheduler_create.Rd b/man/ddim_scheduler_create.Rd index 3eaf630..0affeec 100644 --- a/man/ddim_scheduler_create.Rd +++ b/man/ddim_scheduler_create.Rd @@ -3,13 +3,17 @@ \alias{ddim_scheduler_create} \title{Create a DDIM Scheduler} \usage{ -ddim_scheduler_create(num_train_timesteps = 1000, num_inference_steps = 50, - eta = 0, - beta_schedule = c("linear", "scaled_linear", "cosine"), - beta_start = 0.00085, beta_end = 0.012, - rescale_betas_zero_snr = FALSE, - dtype = torch::torch_float32(), - device = torch::torch_device("cpu")) +ddim_scheduler_create( + num_train_timesteps = 1000, + num_inference_steps = 50, + eta = 0, + beta_schedule = c("linear", "scaled_linear", "cosine"), + beta_start = 0.00085, + beta_end = 0.012, + rescale_betas_zero_snr = FALSE, + dtype = torch::torch_float32(), + device = torch::torch_device("cpu") +) } \arguments{ \item{num_train_timesteps}{Integer. The number of diffusion steps used to diff --git a/man/ddim_scheduler_step.Rd b/man/ddim_scheduler_step.Rd index 1945efb..bb3c959 100644 --- a/man/ddim_scheduler_step.Rd +++ b/man/ddim_scheduler_step.Rd @@ -3,12 +3,22 @@ \alias{ddim_scheduler_step} \title{Perform a DDIM scheduler step} \usage{ -ddim_scheduler_step(model_output, timestep, sample, schedule, eta = 0, - use_clipped_model_output = FALSE, thresholding = FALSE, - generator = NULL, variance_noise = NULL, - clip_sample = FALSE, set_alpha_to_one = FALSE, - prediction_type = c("epsilon", "sample", "v_prediction"), - dtype = torch::torch_float32(), device = "cpu") +ddim_scheduler_step( + model_output, + timestep, + sample, + schedule, + eta = 0, + use_clipped_model_output = FALSE, + thresholding = FALSE, + generator = NULL, + variance_noise = NULL, + clip_sample = FALSE, + set_alpha_to_one = FALSE, + prediction_type = c("epsilon", "sample", "v_prediction"), + dtype = torch::torch_float32(), + device = "cpu" +) } \arguments{ \item{model_output}{Numeric array. The output from the diffusion model, typically diff --git a/man/dot-ltx23_jit_run_stack.Rd b/man/dot-ltx23_jit_run_stack.Rd index 4c53f2d..0580292 100644 --- a/man/dot-ltx23_jit_run_stack.Rd +++ b/man/dot-ltx23_jit_run_stack.Rd @@ -3,15 +3,28 @@ \alias{.ltx23_jit_run_stack} \title{Run the block stack through the compiled TorchScript path} \usage{ -.ltx23_jit_run_stack(blocks, hidden_states, audio_hidden_states, - encoder_hidden_states, audio_encoder_hidden_states, temb, - temb_audio, temb_ca_scale_shift, - temb_ca_audio_scale_shift, temb_ca_gate, - temb_ca_audio_gate, temb_prompt, temb_prompt_audio, - video_rotary_emb, audio_rotary_emb, ca_video_rotary_emb, - ca_audio_rotary_emb, encoder_attention_mask = NULL, - audio_encoder_attention_mask = NULL, - cond_token_index = NULL) +.ltx23_jit_run_stack( + blocks, + hidden_states, + audio_hidden_states, + encoder_hidden_states, + audio_encoder_hidden_states, + temb, + temb_audio, + temb_ca_scale_shift, + temb_ca_audio_scale_shift, + temb_ca_gate, + temb_ca_audio_gate, + temb_prompt, + temb_prompt_audio, + video_rotary_emb, + audio_rotary_emb, + ca_video_rotary_emb, + ca_audio_rotary_emb, + encoder_attention_mask = NULL, + audio_encoder_attention_mask = NULL, + cond_token_index = NULL +) } \value{ list(hidden_states, audio_hidden_states) diff --git a/man/download_component.Rd b/man/download_component.Rd index 6353746..684b0f5 100644 --- a/man/download_component.Rd +++ b/man/download_component.Rd @@ -3,8 +3,13 @@ \alias{download_component} \title{Download a single TorchScript model component} \usage{ -download_component(model_name = "sd21", component, device = "cpu", - overwrite = FALSE, show_progress = TRUE) +download_component( + model_name = "sd21", + component, + device = "cpu", + overwrite = FALSE, + show_progress = TRUE +) } \arguments{ \item{model_name}{Character string, the name of the model (e.g., \code{"sd21"}).} diff --git a/man/download_flux1.Rd b/man/download_flux1.Rd index 4e68488..3e2469f 100644 --- a/man/download_flux1.Rd +++ b/man/download_flux1.Rd @@ -3,8 +3,13 @@ \alias{download_flux1} \title{Download FLUX.1-schnell and build the quantized artifact} \usage{ -download_flux1(quantize = TRUE, precision = c("nf4", "fp8"), output_dir = NULL, - text_encoders = TRUE, verbose = TRUE) +download_flux1( + quantize = TRUE, + precision = c("nf4", "fp8"), + output_dir = NULL, + text_encoders = TRUE, + verbose = TRUE +) } \arguments{ \item{quantize}{Logical. Build the quantized artifact after diff --git a/man/download_flux2_klein.Rd b/man/download_flux2_klein.Rd index 299cee8..af6b7c6 100644 --- a/man/download_flux2_klein.Rd +++ b/man/download_flux2_klein.Rd @@ -3,8 +3,13 @@ \alias{download_flux2_klein} \title{Download FLUX.2-klein-4B and build the quantized artifact} \usage{ -download_flux2_klein(quantize = TRUE, precision = c("auto", "fp8", "nf4"), - output_dir = NULL, text_encoders = TRUE, verbose = TRUE) +download_flux2_klein( + quantize = TRUE, + precision = c("auto", "fp8", "nf4"), + output_dir = NULL, + text_encoders = TRUE, + verbose = TRUE +) } \arguments{ \item{quantize}{Logical. Build the quantized artifact.} diff --git a/man/download_ltx2.Rd b/man/download_ltx2.Rd index d773ee5..43566f9 100644 --- a/man/download_ltx2.Rd +++ b/man/download_ltx2.Rd @@ -3,8 +3,13 @@ \alias{download_ltx2} \title{Download the LTX-2.3 checkpoint and build a quantized artifact} \usage{ -download_ltx2(quantize = TRUE, precision = c("nf4", "fp8"), output_dir = NULL, - text_encoder = TRUE, verbose = TRUE) +download_ltx2( + quantize = TRUE, + precision = c("nf4", "fp8"), + output_dir = NULL, + text_encoder = TRUE, + verbose = TRUE +) } \arguments{ \item{quantize}{Logical. Build the quantized artifact after downloading.} diff --git a/man/download_model.Rd b/man/download_model.Rd index 1dc4108..0f44918 100644 --- a/man/download_model.Rd +++ b/man/download_model.Rd @@ -3,10 +3,14 @@ \alias{download_model} \title{Download TorchScript model files for Stable Diffusion} \usage{ -download_model(model_name = "sd21", - devices = list(unet = "cpu", decoder = "cpu", text_encoder = "cpu"), - unet_dtype_str = NULL, overwrite = FALSE, show_progress = TRUE, - download_models = FALSE) +download_model( + model_name = "sd21", + devices = list(unet = "cpu", decoder = "cpu", text_encoder = "cpu"), + unet_dtype_str = NULL, + overwrite = FALSE, + show_progress = TRUE, + download_models = FALSE +) } \arguments{ \item{model_name}{Name of the model (e.g., "sd21" for stable-diffusion-2-1)} diff --git a/man/download_zimage_turbo.Rd b/man/download_zimage_turbo.Rd index 4b7a109..323ec6f 100644 --- a/man/download_zimage_turbo.Rd +++ b/man/download_zimage_turbo.Rd @@ -3,8 +3,13 @@ \alias{download_zimage_turbo} \title{Download Z-Image-Turbo and build the quantized artifact} \usage{ -download_zimage_turbo(quantize = TRUE, precision = c("auto", "fp8", "nf4"), - output_dir = NULL, text_encoders = TRUE, verbose = TRUE) +download_zimage_turbo( + quantize = TRUE, + precision = c("auto", "fp8", "nf4"), + output_dir = NULL, + text_encoders = TRUE, + verbose = TRUE +) } \arguments{ \item{quantize}{Logical. Build the quantized artifact.} diff --git a/man/encode_bpe.Rd b/man/encode_bpe.Rd index d99ea9e..f0ad760 100644 --- a/man/encode_bpe.Rd +++ b/man/encode_bpe.Rd @@ -3,8 +3,15 @@ \alias{encode_bpe} \title{Encode text to token IDs} \usage{ -encode_bpe(tokenizer, text, add_special_tokens = TRUE, max_length = NULL, - padding = "none", truncation = FALSE, return_tensors = "list") +encode_bpe( + tokenizer, + text, + add_special_tokens = TRUE, + max_length = NULL, + padding = "none", + truncation = FALSE, + return_tensors = "list" +) } \arguments{ \item{tokenizer}{A bpe_tokenizer object.} diff --git a/man/encode_qwen.Rd b/man/encode_qwen.Rd index ae78b95..f54a74c 100644 --- a/man/encode_qwen.Rd +++ b/man/encode_qwen.Rd @@ -3,8 +3,13 @@ \alias{encode_qwen} \title{Encode prompts with the Qwen tokenizer} \usage{ -encode_qwen(tokenizer, texts, max_length = 512L, chat_template = TRUE, - enable_thinking = FALSE) +encode_qwen( + tokenizer, + texts, + max_length = 512L, + chat_template = TRUE, + enable_thinking = FALSE +) } \arguments{ \item{tokenizer}{A \code{\link{qwen_bpe_tokenizer}}.} diff --git a/man/encode_with_gemma3.Rd b/man/encode_with_gemma3.Rd index bd67717..89a0df1 100644 --- a/man/encode_with_gemma3.Rd +++ b/man/encode_with_gemma3.Rd @@ -3,9 +3,15 @@ \alias{encode_with_gemma3} \title{Encode text with Gemma3 for LTX-2} \usage{ -encode_with_gemma3(prompts, model = NULL, tokenizer = NULL, - max_sequence_length = 1024L, device = "cuda", - dtype = "float16", verbose = TRUE) +encode_with_gemma3( + prompts, + model = NULL, + tokenizer = NULL, + max_sequence_length = 1024L, + device = "cuda", + dtype = "float16", + verbose = TRUE +) } \arguments{ \item{prompts}{Character vector of prompts.} diff --git a/man/encode_with_qwen3.Rd b/man/encode_with_qwen3.Rd index 9cf9a03..f917c47 100644 --- a/man/encode_with_qwen3.Rd +++ b/man/encode_with_qwen3.Rd @@ -3,8 +3,14 @@ \alias{encode_with_qwen3} \title{Encode prompts with the Qwen3 encoder for FLUX.2} \usage{ -encode_with_qwen3(prompts, model, tokenizer, max_sequence_length = 512L, - out_layers = c(9L, 18L, 27L), device = NULL) +encode_with_qwen3( + prompts, + model, + tokenizer, + max_sequence_length = 512L, + out_layers = c(9L, 18L, 27L), + device = NULL +) } \arguments{ \item{prompts}{Character vector.} diff --git a/man/encode_with_t5.Rd b/man/encode_with_t5.Rd index d01c4c4..4aaeea4 100644 --- a/man/encode_with_t5.Rd +++ b/man/encode_with_t5.Rd @@ -3,8 +3,13 @@ \alias{encode_with_t5} \title{Encode prompts with the T5 encoder} \usage{ -encode_with_t5(prompts, model, tokenizer, max_sequence_length = 256L, - device = NULL) +encode_with_t5( + prompts, + model, + tokenizer, + max_sequence_length = 256L, + device = NULL +) } \arguments{ \item{prompts}{Character vector.} diff --git a/man/flowmatch_calculate_shift.Rd b/man/flowmatch_calculate_shift.Rd index 003673a..7433111 100644 --- a/man/flowmatch_calculate_shift.Rd +++ b/man/flowmatch_calculate_shift.Rd @@ -3,8 +3,13 @@ \alias{flowmatch_calculate_shift} \title{Calculate shift for dynamic shifting} \usage{ -flowmatch_calculate_shift(seq_len, base_seq_len = 256L, max_seq_len = 4096L, - base_shift = 0.5, max_shift = 1.15) +flowmatch_calculate_shift( + seq_len, + base_seq_len = 256L, + max_seq_len = 4096L, + base_shift = 0.5, + max_shift = 1.15 +) } \arguments{ \item{seq_len}{Integer. The sequence length (num_patches).} diff --git a/man/flowmatch_scheduler_create.Rd b/man/flowmatch_scheduler_create.Rd index 35fe1fc..94a7734 100644 --- a/man/flowmatch_scheduler_create.Rd +++ b/man/flowmatch_scheduler_create.Rd @@ -3,12 +3,18 @@ \alias{flowmatch_scheduler_create} \title{Create a FlowMatch Euler Discrete Scheduler} \usage{ -flowmatch_scheduler_create(num_train_timesteps = 1000L, shift = 1, - use_dynamic_shifting = FALSE, base_shift = 0.5, - max_shift = 1.15, base_seq_len = 256L, - max_seq_len = 4096L, invert_sigmas = FALSE, - shift_terminal = NULL, - time_shift_type = c("exponential", "linear")) +flowmatch_scheduler_create( + num_train_timesteps = 1000L, + shift = 1, + use_dynamic_shifting = FALSE, + base_shift = 0.5, + max_shift = 1.15, + base_seq_len = 256L, + max_seq_len = 4096L, + invert_sigmas = FALSE, + shift_terminal = NULL, + time_shift_type = c("exponential", "linear") +) } \arguments{ \item{num_train_timesteps}{Integer. The number of diffusion steps used to diff --git a/man/flowmatch_scheduler_step.Rd b/man/flowmatch_scheduler_step.Rd index 63f3eaa..4db2184 100644 --- a/man/flowmatch_scheduler_step.Rd +++ b/man/flowmatch_scheduler_step.Rd @@ -3,8 +3,13 @@ \alias{flowmatch_scheduler_step} \title{Perform a FlowMatch scheduler step} \usage{ -flowmatch_scheduler_step(model_output, timestep, sample, schedule, - generator = NULL) +flowmatch_scheduler_step( + model_output, + timestep, + sample, + schedule, + generator = NULL +) } \arguments{ \item{model_output}{torch tensor. The output from the diffusion model diff --git a/man/flowmatch_set_timesteps.Rd b/man/flowmatch_set_timesteps.Rd index 78c2f7f..89881cb 100644 --- a/man/flowmatch_set_timesteps.Rd +++ b/man/flowmatch_set_timesteps.Rd @@ -3,8 +3,14 @@ \alias{flowmatch_set_timesteps} \title{Set timesteps for inference} \usage{ -flowmatch_set_timesteps(schedule, num_inference_steps = 50L, device = "cpu", - mu = NULL, sigmas = NULL, timesteps = NULL) +flowmatch_set_timesteps( + schedule, + num_inference_steps = 50L, + device = "cpu", + mu = NULL, + sigmas = NULL, + timesteps = NULL +) } \arguments{ \item{schedule}{List. The FlowMatch scheduler object.} diff --git a/man/flux2_double_block.Rd b/man/flux2_double_block.Rd index d6457c6..119f876 100644 --- a/man/flux2_double_block.Rd +++ b/man/flux2_double_block.Rd @@ -3,8 +3,14 @@ \alias{flux2_double_block} \title{FLUX.2 double-stream (MMDiT) block} \usage{ -flux2_double_block(dim, num_attention_heads, attention_head_dim, mlp_ratio = 3, - eps = 1e-06, bias = FALSE) +flux2_double_block( + dim, + num_attention_heads, + attention_head_dim, + mlp_ratio = 3, + eps = 1e-06, + bias = FALSE +) } \arguments{ \item{dim}{Integer. Model dimension.} diff --git a/man/flux2_load_pipeline.Rd b/man/flux2_load_pipeline.Rd index 34964a9..0ea182a 100644 --- a/man/flux2_load_pipeline.Rd +++ b/man/flux2_load_pipeline.Rd @@ -3,10 +3,16 @@ \alias{flux2_load_pipeline} \title{Load the FLUX.2 klein pipeline} \usage{ -flux2_load_pipeline(model_dir = NULL, device = "cuda", - precision = c("auto", "fp8", "nf4", "bf16"), - text_device = NULL, attn_chunk = NULL, - phase_offload = TRUE, pin = NULL, verbose = TRUE) +flux2_load_pipeline( + model_dir = NULL, + device = "cuda", + precision = c("auto", "fp8", "nf4", "bf16"), + text_device = NULL, + attn_chunk = NULL, + phase_offload = TRUE, + pin = NULL, + verbose = TRUE +) } \arguments{ \item{model_dir}{Quantized artifact directory (default: the diff --git a/man/flux2_parallel_self_attention.Rd b/man/flux2_parallel_self_attention.Rd index 04c2598..8cae26a 100644 --- a/man/flux2_parallel_self_attention.Rd +++ b/man/flux2_parallel_self_attention.Rd @@ -3,8 +3,14 @@ \alias{flux2_parallel_self_attention} \title{FLUX.2 parallel self-attention (single-stream)} \usage{ -flux2_parallel_self_attention(query_dim, heads, dim_head, mlp_ratio = 3, - eps = 1e-06, bias = FALSE) +flux2_parallel_self_attention( + query_dim, + heads, + dim_head, + mlp_ratio = 3, + eps = 1e-06, + bias = FALSE +) } \arguments{ \item{query_dim}{Integer. Model dimension.} diff --git a/man/flux2_single_block.Rd b/man/flux2_single_block.Rd index 0a72614..5647b05 100644 --- a/man/flux2_single_block.Rd +++ b/man/flux2_single_block.Rd @@ -3,8 +3,14 @@ \alias{flux2_single_block} \title{FLUX.2 single-stream block (parallel)} \usage{ -flux2_single_block(dim, num_attention_heads, attention_head_dim, mlp_ratio = 3, - eps = 1e-06, bias = FALSE) +flux2_single_block( + dim, + num_attention_heads, + attention_head_dim, + mlp_ratio = 3, + eps = 1e-06, + bias = FALSE +) } \arguments{ \item{dim}{Integer. Model dimension.} diff --git a/man/flux2_transformer.Rd b/man/flux2_transformer.Rd index dd13ae8..fa33abc 100644 --- a/man/flux2_transformer.Rd +++ b/man/flux2_transformer.Rd @@ -3,12 +3,20 @@ \alias{flux2_transformer} \title{FLUX.2 transformer model} \usage{ -flux2_transformer(in_channels = 128L, num_layers = 5L, num_single_layers = 20L, - attention_head_dim = 128L, num_attention_heads = 24L, - joint_attention_dim = 7680L, mlp_ratio = 3, - timestep_guidance_channels = 256L, - axes_dims_rope = c(32L, 32L, 32L, 32L), rope_theta = 2000, - eps = 1e-06, out_channels = NULL) +flux2_transformer( + in_channels = 128L, + num_layers = 5L, + num_single_layers = 20L, + attention_head_dim = 128L, + num_attention_heads = 24L, + joint_attention_dim = 7680L, + mlp_ratio = 3, + timestep_guidance_channels = 256L, + axes_dims_rope = c(32L, 32L, 32L, 32L), + rope_theta = 2000, + eps = 1e-06, + out_channels = NULL +) } \arguments{ \item{in_channels}{Integer. Packed latent channels (128).} diff --git a/man/flux2_vae_decoder.Rd b/man/flux2_vae_decoder.Rd index 0a3baa7..d6dbe3e 100644 --- a/man/flux2_vae_decoder.Rd +++ b/man/flux2_vae_decoder.Rd @@ -3,8 +3,11 @@ \alias{flux2_vae_decoder} \title{FLUX.2 VAE decoder} \usage{ -flux2_vae_decoder(latent_channels = 32L, - block_channels = c(512L, 512L, 256L, 128L), norm_groups = 32L) +flux2_vae_decoder( + latent_channels = 32L, + block_channels = c(512L, 512L, 256L, 128L), + norm_groups = 32L +) } \arguments{ \item{latent_channels}{Integer (32 for FLUX.2).} diff --git a/man/flux_attention.Rd b/man/flux_attention.Rd index 1a3ee37..9fe4ee0 100644 --- a/man/flux_attention.Rd +++ b/man/flux_attention.Rd @@ -3,8 +3,15 @@ \alias{flux_attention} \title{FLUX joint attention} \usage{ -flux_attention(query_dim, heads, dim_head, added_kv = FALSE, pre_only = FALSE, - eps = 1e-06, bias = TRUE) +flux_attention( + query_dim, + heads, + dim_head, + added_kv = FALSE, + pre_only = FALSE, + eps = 1e-06, + bias = TRUE +) } \arguments{ \item{query_dim}{Integer. Model dimension.} diff --git a/man/flux_load_pipeline.Rd b/man/flux_load_pipeline.Rd index 1d033fa..23ee5e6 100644 --- a/man/flux_load_pipeline.Rd +++ b/man/flux_load_pipeline.Rd @@ -3,9 +3,16 @@ \alias{flux_load_pipeline} \title{Load the FLUX.1-schnell pipeline} \usage{ -flux_load_pipeline(model_dir = NULL, device = "cuda", precision = NULL, - text_device = NULL, attn_chunk = NULL, phase_offload = TRUE, - pin = NULL, verbose = TRUE) +flux_load_pipeline( + model_dir = NULL, + device = "cuda", + precision = NULL, + text_device = NULL, + attn_chunk = NULL, + phase_offload = TRUE, + pin = NULL, + verbose = TRUE +) } \arguments{ \item{model_dir}{Quantized artifact directory (default: the diff --git a/man/flux_load_transformer.Rd b/man/flux_load_transformer.Rd index 75c4699..e0efdf3 100644 --- a/man/flux_load_transformer.Rd +++ b/man/flux_load_transformer.Rd @@ -3,8 +3,15 @@ \alias{flux_load_transformer} \title{Load a FLUX transformer from any checkpoint format} \usage{ -flux_load_transformer(ckpt, device = "cuda", dtype = "bfloat16", pin = TRUE, - fp8_resident = FALSE, verbose = TRUE, ...) +flux_load_transformer( + ckpt, + device = "cuda", + dtype = "bfloat16", + pin = TRUE, + fp8_resident = FALSE, + verbose = TRUE, + ... +) } \arguments{ \item{ckpt}{A checkpoint from \code{\link{flux_open_checkpoint}} or diff --git a/man/flux_quantize.Rd b/man/flux_quantize.Rd index bcac1b1..cfa3aac 100644 --- a/man/flux_quantize.Rd +++ b/man/flux_quantize.Rd @@ -3,8 +3,14 @@ \alias{flux_quantize} \title{Quantize a FLUX transformer to NF4 or fp8 shards} \usage{ -flux_quantize(transformer_dir, output_dir = NULL, format = c("nf4", "fp8"), - shard_bytes = 1.9e+09, force = FALSE, verbose = TRUE) +flux_quantize( + transformer_dir, + output_dir = NULL, + format = c("nf4", "fp8"), + shard_bytes = 1.9e+09, + force = FALSE, + verbose = TRUE +) } \arguments{ \item{transformer_dir}{Source diffusers transformer directory.} diff --git a/man/flux_transformer.Rd b/man/flux_transformer.Rd index 86b5cd9..83a88e1 100644 --- a/man/flux_transformer.Rd +++ b/man/flux_transformer.Rd @@ -3,10 +3,17 @@ \alias{flux_transformer} \title{FLUX transformer model} \usage{ -flux_transformer(in_channels = 64L, num_layers = 19L, num_single_layers = 38L, - attention_head_dim = 128L, num_attention_heads = 24L, - joint_attention_dim = 4096L, pooled_projection_dim = 768L, - axes_dims_rope = c(16L, 56L, 56L), out_channels = NULL) +flux_transformer( + in_channels = 64L, + num_layers = 19L, + num_single_layers = 38L, + attention_head_dim = 128L, + num_attention_heads = 24L, + joint_attention_dim = 4096L, + pooled_projection_dim = 768L, + axes_dims_rope = c(16L, 56L, 56L), + out_channels = NULL +) } \arguments{ \item{in_channels}{Integer. Packed latent channels (64).} diff --git a/man/gemma3_encode_batch.Rd b/man/gemma3_encode_batch.Rd index f8a897d..41d76ea 100644 --- a/man/gemma3_encode_batch.Rd +++ b/man/gemma3_encode_batch.Rd @@ -3,9 +3,16 @@ \alias{gemma3_encode_batch} \title{Batch-encode prompts with Gemma3, cached to disk} \usage{ -gemma3_encode_batch(prompts, model = NULL, tokenizer = NULL, batch_size = 4L, - cache_dir = NULL, max_sequence_length = 1024L, - device = "cuda", verbose = TRUE) +gemma3_encode_batch( + prompts, + model = NULL, + tokenizer = NULL, + batch_size = 4L, + cache_dir = NULL, + max_sequence_length = 1024L, + device = "cuda", + verbose = TRUE +) } \arguments{ \item{prompts}{Character vector.} diff --git a/man/gemma3_quantize_nf4.Rd b/man/gemma3_quantize_nf4.Rd index f4c6817..0195f38 100644 --- a/man/gemma3_quantize_nf4.Rd +++ b/man/gemma3_quantize_nf4.Rd @@ -3,8 +3,13 @@ \alias{gemma3_quantize_nf4} \title{Quantize a Gemma3 text encoder to NF4 shards} \usage{ -gemma3_quantize_nf4(model_path, output_dir = NULL, shard_bytes = 1.9e+09, - force = FALSE, verbose = TRUE) +gemma3_quantize_nf4( + model_path, + output_dir = NULL, + shard_bytes = 1.9e+09, + force = FALSE, + verbose = TRUE +) } \arguments{ \item{model_path}{HuggingFace snapshot directory (config.json + diff --git a/man/gemma3_rotary_embedding.Rd b/man/gemma3_rotary_embedding.Rd index c80dea0..f840809 100644 --- a/man/gemma3_rotary_embedding.Rd +++ b/man/gemma3_rotary_embedding.Rd @@ -3,8 +3,12 @@ \alias{gemma3_rotary_embedding} \title{Gemma3 Rotary Position Embeddings} \usage{ -gemma3_rotary_embedding(dim, max_position_embeddings = 8192L, base = 10000, - scaling_factor = 1) +gemma3_rotary_embedding( + dim, + max_position_embeddings = 8192L, + base = 10000, + scaling_factor = 1 +) } \arguments{ \item{dim}{Integer. Head dimension.} diff --git a/man/img2img.Rd b/man/img2img.Rd index ad8cdbc..f25797d 100644 --- a/man/img2img.Rd +++ b/man/img2img.Rd @@ -3,13 +3,29 @@ \alias{img2img} \title{Image-to-Image Generation with Stable Diffusion} \usage{ -img2img(input_image, prompt, negative_prompt = NULL, img_dim = 512, - model_name = c("sd21", "sdxl"), pipeline = NULL, devices = "auto", - unet_dtype_str = "float16", download_models = FALSE, - scheduler = "ddim", num_inference_steps = 50, strength = 0.8, - guidance_scale = 7.5, seed = NULL, save_file = TRUE, filename = NULL, - metadata_path = NULL, use_native_decoder = FALSE, - use_native_text_encoder = FALSE, use_native_unet = FALSE, ...) +img2img( + input_image, + prompt, + negative_prompt = NULL, + img_dim = 512, + model_name = c("sd21", "sdxl"), + pipeline = NULL, + devices = "auto", + unet_dtype_str = "float16", + download_models = FALSE, + scheduler = "ddim", + num_inference_steps = 50, + strength = 0.8, + guidance_scale = 7.5, + seed = NULL, + save_file = TRUE, + filename = NULL, + metadata_path = NULL, + use_native_decoder = FALSE, + use_native_text_encoder = FALSE, + use_native_unet = FALSE, + ... +) } \arguments{ \item{input_image}{Path to the input image or a tensor representing the image.} diff --git a/man/load_flux2_vae_decoder.Rd b/man/load_flux2_vae_decoder.Rd index b183b0a..9a8fa60 100644 --- a/man/load_flux2_vae_decoder.Rd +++ b/man/load_flux2_vae_decoder.Rd @@ -3,9 +3,13 @@ \alias{load_flux2_vae_decoder} \title{Load the FLUX.2 VAE decoder from safetensors} \usage{ -load_flux2_vae_decoder(path, latent_channels = 32L, - block_channels = c(512L, 512L, 256L, 128L), - norm_groups = 32L, verbose = TRUE) +load_flux2_vae_decoder( + path, + latent_channels = 32L, + block_channels = c(512L, 512L, 256L, 128L), + norm_groups = 32L, + verbose = TRUE +) } \arguments{ \item{path}{Path to the VAE .safetensors file (or a directory diff --git a/man/load_gemma3_nf4.Rd b/man/load_gemma3_nf4.Rd index 7c3208b..0f3baf3 100644 --- a/man/load_gemma3_nf4.Rd +++ b/man/load_gemma3_nf4.Rd @@ -3,8 +3,13 @@ \alias{load_gemma3_nf4} \title{Load a Gemma3 text encoder from an NF4 artifact} \usage{ -load_gemma3_nf4(artifact_dir, device = "cuda", dtype = "bfloat16", - pin = getOption("diffuseR.pin_staging", TRUE), verbose = TRUE) +load_gemma3_nf4( + artifact_dir, + device = "cuda", + dtype = "bfloat16", + pin = getOption("diffuseR.pin_staging", TRUE), + verbose = TRUE +) } \arguments{ \item{artifact_dir}{Directory produced by diff --git a/man/load_gemma3_text_encoder.Rd b/man/load_gemma3_text_encoder.Rd index e334f43..916967d 100644 --- a/man/load_gemma3_text_encoder.Rd +++ b/man/load_gemma3_text_encoder.Rd @@ -3,9 +3,13 @@ \alias{load_gemma3_text_encoder} \title{Load Gemma3 Text Model from safetensors} \usage{ -load_gemma3_text_encoder(model_path, device = "cpu", dtype = "float16", - pin = getOption("diffuseR.pin_staging", TRUE), - verbose = TRUE) +load_gemma3_text_encoder( + model_path, + device = "cpu", + dtype = "float16", + pin = getOption("diffuseR.pin_staging", TRUE), + verbose = TRUE +) } \arguments{ \item{model_path}{Character. Path to directory containing model files.} diff --git a/man/load_model_component.Rd b/man/load_model_component.Rd index d8efbcb..edc91b6 100644 --- a/man/load_model_component.Rd +++ b/man/load_model_component.Rd @@ -3,8 +3,14 @@ \alias{load_model_component} \title{Load a specific component of a diffusion model} \usage{ -load_model_component(component, model_name = "sd21", device = "cpu", - unet_dtype_str = NULL, download = TRUE, use_native = FALSE) +load_model_component( + component, + model_name = "sd21", + device = "cpu", + unet_dtype_str = NULL, + download = TRUE, + use_native = FALSE +) } \arguments{ \item{component}{Character string, the component to load: "unet", "decoder", or "text_encoder".} diff --git a/man/load_pipeline.Rd b/man/load_pipeline.Rd index b805ca7..783d704 100644 --- a/man/load_pipeline.Rd +++ b/man/load_pipeline.Rd @@ -3,9 +3,16 @@ \alias{load_pipeline} \title{Load a diffusion model pipeline} \usage{ -load_pipeline(model_name, m2d, i2i = FALSE, unet_dtype_str, - use_native_decoder = FALSE, use_native_text_encoder = FALSE, - use_native_unet = FALSE, ...) +load_pipeline( + model_name, + m2d, + i2i = FALSE, + unet_dtype_str, + use_native_decoder = FALSE, + use_native_text_encoder = FALSE, + use_native_unet = FALSE, + ... +) } \arguments{ \item{model_name}{The name of the model to load.} diff --git a/man/load_qwen3_text_encoder.Rd b/man/load_qwen3_text_encoder.Rd index f56e45c..00308f2 100644 --- a/man/load_qwen3_text_encoder.Rd +++ b/man/load_qwen3_text_encoder.Rd @@ -3,8 +3,13 @@ \alias{load_qwen3_text_encoder} \title{Load a Qwen3 encoder from a transformers directory} \usage{ -load_qwen3_text_encoder(model_path, device = "cpu", dtype = "float32", - verbose = TRUE, ...) +load_qwen3_text_encoder( + model_path, + device = "cpu", + dtype = "float32", + verbose = TRUE, + ... +) } \arguments{ \item{model_path}{Directory with \code{config.json} and diff --git a/man/load_t5_text_encoder.Rd b/man/load_t5_text_encoder.Rd index ff34b0c..1734e90 100644 --- a/man/load_t5_text_encoder.Rd +++ b/man/load_t5_text_encoder.Rd @@ -3,8 +3,13 @@ \alias{load_t5_text_encoder} \title{Load a T5 encoder from a transformers directory} \usage{ -load_t5_text_encoder(model_path, device = "cpu", dtype = "float32", - verbose = TRUE, ...) +load_t5_text_encoder( + model_path, + device = "cpu", + dtype = "float32", + verbose = TRUE, + ... +) } \arguments{ \item{model_path}{Directory with \code{config.json} and diff --git a/man/ltx23_attention.Rd b/man/ltx23_attention.Rd index 7963a98..c03d479 100644 --- a/man/ltx23_attention.Rd +++ b/man/ltx23_attention.Rd @@ -3,10 +3,19 @@ \alias{ltx23_attention} \title{LTX-2 attention layer} \usage{ -ltx23_attention(query_dim, heads = 8L, kv_heads = NULL, dim_head = 64L, - bias = TRUE, cross_attention_dim = NULL, out_bias = TRUE, - norm_eps = 1e-06, norm_elementwise_affine = TRUE, - rope_type = "split", apply_gated_attention = FALSE) +ltx23_attention( + query_dim, + heads = 8L, + kv_heads = NULL, + dim_head = 64L, + bias = TRUE, + cross_attention_dim = NULL, + out_bias = TRUE, + norm_eps = 1e-06, + norm_elementwise_affine = TRUE, + rope_type = "split", + apply_gated_attention = FALSE +) } \arguments{ \item{query_dim}{Integer. Query feature dimension.} diff --git a/man/ltx23_audio_causal_conv2d.Rd b/man/ltx23_audio_causal_conv2d.Rd index 0a726d5..ee21424 100644 --- a/man/ltx23_audio_causal_conv2d.Rd +++ b/man/ltx23_audio_causal_conv2d.Rd @@ -3,8 +3,13 @@ \alias{ltx23_audio_causal_conv2d} \title{Causal 2D convolution for audio spectrograms} \usage{ -ltx23_audio_causal_conv2d(in_channels, out_channels, kernel_size = 3L, - stride = 1L, causality_axis = "height") +ltx23_audio_causal_conv2d( + in_channels, + out_channels, + kernel_size = 3L, + stride = 1L, + causality_axis = "height" +) } \arguments{ \item{kernel_size}{Integer or length-2 vector.} diff --git a/man/ltx23_audio_decoder.Rd b/man/ltx23_audio_decoder.Rd index 0130a77..ec4f967 100644 --- a/man/ltx23_audio_decoder.Rd +++ b/man/ltx23_audio_decoder.Rd @@ -3,10 +3,15 @@ \alias{ltx23_audio_decoder} \title{LTX-2.3 audio VAE decoder} \usage{ -ltx23_audio_decoder(base_channels = 128L, output_channels = 2L, - num_res_blocks = 2L, latent_channels = 8L, - ch_mult = c(1L, 2L, 4L), causality_axis = "height", - mel_bins = 64L) +ltx23_audio_decoder( + base_channels = 128L, + output_channels = 2L, + num_res_blocks = 2L, + latent_channels = 8L, + ch_mult = c(1L, 2L, 4L), + causality_axis = "height", + mel_bins = 64L +) } \arguments{ \item{base_channels}{Integer.} diff --git a/man/ltx23_audio_encoder.Rd b/man/ltx23_audio_encoder.Rd index e4e9f7f..91bfea2 100644 --- a/man/ltx23_audio_encoder.Rd +++ b/man/ltx23_audio_encoder.Rd @@ -3,9 +3,14 @@ \alias{ltx23_audio_encoder} \title{LTX-2.3 audio VAE encoder} \usage{ -ltx23_audio_encoder(base_channels = 128L, in_channels = 2L, - num_res_blocks = 2L, latent_channels = 8L, - ch_mult = c(1L, 2L, 4L), causality_axis = "height") +ltx23_audio_encoder( + base_channels = 128L, + in_channels = 2L, + num_res_blocks = 2L, + latent_channels = 8L, + ch_mult = c(1L, 2L, 4L), + causality_axis = "height" +) } \arguments{ \item{in_channels}{Integer. Mel channels (2 = stereo).} diff --git a/man/ltx23_audio_mel_frontend.Rd b/man/ltx23_audio_mel_frontend.Rd index d9572ab..7c27675 100644 --- a/man/ltx23_audio_mel_frontend.Rd +++ b/man/ltx23_audio_mel_frontend.Rd @@ -3,9 +3,14 @@ \alias{ltx23_audio_mel_frontend} \title{Build the 16 kHz log-mel frontend for audio conditioning} \usage{ -ltx23_audio_mel_frontend(filter_length = 1024L, hop_length = 160L, - n_mels = 64L, sample_rate = 16000L, fmin = 0, - fmax = 8000) +ltx23_audio_mel_frontend( + filter_length = 1024L, + hop_length = 160L, + n_mels = 64L, + sample_rate = 16000L, + fmin = 0, + fmax = 8000 +) } \arguments{ \item{filter_length,hop_length,n_mels,sample_rate,fmin,fmax}{The diff --git a/man/ltx23_audio_resnet_block.Rd b/man/ltx23_audio_resnet_block.Rd index e7bae9f..4b7bd22 100644 --- a/man/ltx23_audio_resnet_block.Rd +++ b/man/ltx23_audio_resnet_block.Rd @@ -3,8 +3,11 @@ \alias{ltx23_audio_resnet_block} \title{LTX audio ResNet block} \usage{ -ltx23_audio_resnet_block(in_channels, out_channels = NULL, - causality_axis = "height") +ltx23_audio_resnet_block( + in_channels, + out_channels = NULL, + causality_axis = "height" +) } \arguments{ \item{causality_axis}{Character.} diff --git a/man/ltx23_audio_vae.Rd b/man/ltx23_audio_vae.Rd index 8e654d4..4ab7579 100644 --- a/man/ltx23_audio_vae.Rd +++ b/man/ltx23_audio_vae.Rd @@ -3,10 +3,16 @@ \alias{ltx23_audio_vae} \title{LTX-2.3 audio VAE} \usage{ -ltx23_audio_vae(base_channels = 128L, output_channels = 2L, - num_res_blocks = 2L, latent_channels = 8L, - ch_mult = c(1L, 2L, 4L), causality_axis = "height", - mel_bins = 64L, in_channels = 2L) +ltx23_audio_vae( + base_channels = 128L, + output_channels = 2L, + num_res_blocks = 2L, + latent_channels = 8L, + ch_mult = c(1L, 2L, 4L), + causality_axis = "height", + mel_bins = 64L, + in_channels = 2L +) } \arguments{ \item{in_channels}{Integer. Mel input channels (2 = stereo).} diff --git a/man/ltx23_causal_conv3d.Rd b/man/ltx23_causal_conv3d.Rd index c4ed8fc..f0f6004 100644 --- a/man/ltx23_causal_conv3d.Rd +++ b/man/ltx23_causal_conv3d.Rd @@ -3,8 +3,13 @@ \alias{ltx23_causal_conv3d} \title{Causal 3D convolution} \usage{ -ltx23_causal_conv3d(in_channels, out_channels, kernel_size = 3L, stride = 1L, - spatial_padding_mode = "zeros") +ltx23_causal_conv3d( + in_channels, + out_channels, + kernel_size = 3L, + stride = 1L, + spatial_padding_mode = "zeros" +) } \arguments{ \item{kernel_size}{Integer or length-3 vector (t, h, w).} diff --git a/man/ltx23_connector_transformer_1d.Rd b/man/ltx23_connector_transformer_1d.Rd index 8b38659..2785766 100644 --- a/man/ltx23_connector_transformer_1d.Rd +++ b/man/ltx23_connector_transformer_1d.Rd @@ -3,12 +3,18 @@ \alias{ltx23_connector_transformer_1d} \title{1D connector transformer} \usage{ -ltx23_connector_transformer_1d(num_attention_heads = 32L, - attention_head_dim = 128L, num_layers = 8L, - num_learnable_registers = 128L, - rope_base_seq_len = 4096L, rope_theta = 10000, - rope_double_precision = TRUE, eps = 1e-06, - rope_type = "split", gated_attention = TRUE) +ltx23_connector_transformer_1d( + num_attention_heads = 32L, + attention_head_dim = 128L, + num_layers = 8L, + num_learnable_registers = 128L, + rope_base_seq_len = 4096L, + rope_theta = 10000, + rope_double_precision = TRUE, + eps = 1e-06, + rope_type = "split", + gated_attention = TRUE +) } \arguments{ \item{num_learnable_registers}{Integer or NULL. Register count (the diff --git a/man/ltx23_get_timestep_embedding.Rd b/man/ltx23_get_timestep_embedding.Rd index 9b6e90d..d143476 100644 --- a/man/ltx23_get_timestep_embedding.Rd +++ b/man/ltx23_get_timestep_embedding.Rd @@ -3,8 +3,13 @@ \alias{ltx23_get_timestep_embedding} \title{Sinusoidal timestep embedding} \usage{ -ltx23_get_timestep_embedding(timesteps, embedding_dim, flip_sin_to_cos = TRUE, - downscale_freq_shift = 0, max_period = 10000) +ltx23_get_timestep_embedding( + timesteps, + embedding_dim, + flip_sin_to_cos = TRUE, + downscale_freq_shift = 0, + max_period = 10000 +) } \arguments{ \item{timesteps}{1D tensor of timestep values.} diff --git a/man/ltx23_latent_upsampler.Rd b/man/ltx23_latent_upsampler.Rd index c7737db..282af13 100644 --- a/man/ltx23_latent_upsampler.Rd +++ b/man/ltx23_latent_upsampler.Rd @@ -3,8 +3,11 @@ \alias{ltx23_latent_upsampler} \title{LTX-2.3 latent upsampler model} \usage{ -ltx23_latent_upsampler(in_channels = 128L, mid_channels = 1024L, - num_blocks_per_stage = 4L) +ltx23_latent_upsampler( + in_channels = 128L, + mid_channels = 1024L, + num_blocks_per_stage = 4L +) } \arguments{ \item{in_channels}{Integer. Latent channels.} diff --git a/man/ltx23_load_group.Rd b/man/ltx23_load_group.Rd index 8a89164..b03bb9a 100644 --- a/man/ltx23_load_group.Rd +++ b/man/ltx23_load_group.Rd @@ -3,8 +3,14 @@ \alias{ltx23_load_group} \title{Stream a checkpoint key group into a module} \usage{ -ltx23_load_group(ckpt, keys, module, map_key = identity, verbose = TRUE, - gc_every = 50L) +ltx23_load_group( + ckpt, + keys, + module, + map_key = identity, + verbose = TRUE, + gc_every = 50L +) } \arguments{ \item{ckpt}{An \code{ltx23_checkpoint}.} diff --git a/man/ltx23_load_pipeline.Rd b/man/ltx23_load_pipeline.Rd index ede7113..e86f851 100644 --- a/man/ltx23_load_pipeline.Rd +++ b/man/ltx23_load_pipeline.Rd @@ -3,11 +3,17 @@ \alias{ltx23_load_pipeline} \title{Load the LTX-2.3 generation components from a single-file checkpoint} \usage{ -ltx23_load_pipeline(checkpoint_path, device = "cuda", dtype = "bfloat16", - transformer_device = "cpu", - components = c("dit", "connectors", "vae", "audio_vae", "vocoder"), - pin = TRUE, attn_chunk = NULL, phase_offload = TRUE, - verbose = TRUE) +ltx23_load_pipeline( + checkpoint_path, + device = "cuda", + dtype = "bfloat16", + transformer_device = "cpu", + components = c("dit", "connectors", "vae", "audio_vae", "vocoder"), + pin = TRUE, + attn_chunk = NULL, + phase_offload = TRUE, + verbose = TRUE +) } \arguments{ \item{checkpoint_path}{Path to the single-file checkpoint (e.g. diff --git a/man/ltx23_load_transformer_fp8.Rd b/man/ltx23_load_transformer_fp8.Rd index 767c8f4..5943c38 100644 --- a/man/ltx23_load_transformer_fp8.Rd +++ b/man/ltx23_load_transformer_fp8.Rd @@ -3,8 +3,13 @@ \alias{ltx23_load_transformer_fp8} \title{Load the LTX-2.3 transformer with FP8 weights} \usage{ -ltx23_load_transformer_fp8(ckpt, device = "cuda", pin = TRUE, verbose = TRUE, - ...) +ltx23_load_transformer_fp8( + ckpt, + device = "cuda", + pin = TRUE, + verbose = TRUE, + ... +) } \arguments{ \item{ckpt}{An fp8 \code{ltx23_checkpoint} diff --git a/man/ltx23_mel_stft.Rd b/man/ltx23_mel_stft.Rd index 74cf31c..9eac9da 100644 --- a/man/ltx23_mel_stft.Rd +++ b/man/ltx23_mel_stft.Rd @@ -3,8 +3,12 @@ \alias{ltx23_mel_stft} \title{Causal log-mel spectrogram with checkpoint-loaded bases} \usage{ -ltx23_mel_stft(filter_length = 512L, hop_length = 80L, window_length = 512L, - num_mel_channels = 64L) +ltx23_mel_stft( + filter_length = 512L, + hop_length = 80L, + window_length = 512L, + num_mel_channels = 64L +) } \arguments{ \item{filter_length,hop_length,window_length,num_mel_channels}{Integers.} diff --git a/man/ltx23_nf4_dequantize.Rd b/man/ltx23_nf4_dequantize.Rd index 5ec7975..df76875 100644 --- a/man/ltx23_nf4_dequantize.Rd +++ b/man/ltx23_nf4_dequantize.Rd @@ -3,8 +3,14 @@ \alias{ltx23_nf4_dequantize} \title{Dequantize NF4 data to a float tensor} \usage{ -ltx23_nf4_dequantize(packed, absmax, shape, dtype = torch::torch_bfloat16(), - chunk_elements = 8388608L, out = NULL) +ltx23_nf4_dequantize( + packed, + absmax, + shape, + dtype = torch::torch_bfloat16(), + chunk_elements = 8388608L, + out = NULL +) } \arguments{ \item{packed}{uint8 tensor of packed index pairs.} diff --git a/man/ltx23_prepare_conditioned_latents.Rd b/man/ltx23_prepare_conditioned_latents.Rd index 6688cef..ea9692e 100644 --- a/man/ltx23_prepare_conditioned_latents.Rd +++ b/man/ltx23_prepare_conditioned_latents.Rd @@ -3,8 +3,14 @@ \alias{ltx23_prepare_conditioned_latents} \title{Build conditioned initial latents and the conditioning mask} \usage{ -ltx23_prepare_conditioned_latents(cond_latents, latent_frames, latent_height, - latent_width, noise, cond_noise_scale = 0) +ltx23_prepare_conditioned_latents( + cond_latents, + latent_frames, + latent_height, + latent_width, + noise, + cond_noise_scale = 0 +) } \arguments{ \item{cond_latents}{Normalized condition latents diff --git a/man/ltx23_quantize_fp8.Rd b/man/ltx23_quantize_fp8.Rd index 06e722e..21a2ad9 100644 --- a/man/ltx23_quantize_fp8.Rd +++ b/man/ltx23_quantize_fp8.Rd @@ -3,8 +3,13 @@ \alias{ltx23_quantize_fp8} \title{Quantize an LTX-2.3 checkpoint to FP8 shards} \usage{ -ltx23_quantize_fp8(checkpoint_path, output_dir = NULL, shard_bytes = 1.9e+09, - force = FALSE, verbose = TRUE) +ltx23_quantize_fp8( + checkpoint_path, + output_dir = NULL, + shard_bytes = 1.9e+09, + force = FALSE, + verbose = TRUE +) } \arguments{ \item{checkpoint_path}{Source .safetensors (46 GB bf16 single file).} diff --git a/man/ltx23_quantize_nf4.Rd b/man/ltx23_quantize_nf4.Rd index 7c169b5..2406f22 100644 --- a/man/ltx23_quantize_nf4.Rd +++ b/man/ltx23_quantize_nf4.Rd @@ -3,8 +3,13 @@ \alias{ltx23_quantize_nf4} \title{Quantize an LTX-2.3 checkpoint to NF4 shards} \usage{ -ltx23_quantize_nf4(checkpoint_path, output_dir = NULL, shard_bytes = 1.9e+09, - force = FALSE, verbose = TRUE) +ltx23_quantize_nf4( + checkpoint_path, + output_dir = NULL, + shard_bytes = 1.9e+09, + force = FALSE, + verbose = TRUE +) } \arguments{ \item{checkpoint_path}{Source .safetensors (bf16 single file).} diff --git a/man/ltx23_rotary_pos_embed.Rd b/man/ltx23_rotary_pos_embed.Rd index ad8ff38..6035357 100644 --- a/man/ltx23_rotary_pos_embed.Rd +++ b/man/ltx23_rotary_pos_embed.Rd @@ -3,13 +3,23 @@ \alias{ltx23_rotary_pos_embed} \title{LTX-2.3 audio/video rotary position embedder} \usage{ -ltx23_rotary_pos_embed(dim, patch_size = 1L, patch_size_t = 1L, - base_num_frames = 20L, base_height = 2048L, - base_width = 2048L, sampling_rate = 16000L, - hop_length = 160L, scale_factors = c(8L, 32L, 32L), - theta = 10000, causal_offset = 1L, modality = "video", - double_precision = TRUE, rope_type = "split", - num_attention_heads = 32L) +ltx23_rotary_pos_embed( + dim, + patch_size = 1L, + patch_size_t = 1L, + base_num_frames = 20L, + base_height = 2048L, + base_width = 2048L, + sampling_rate = 16000L, + hop_length = 160L, + scale_factors = c(8L, 32L, 32L), + theta = 10000, + causal_offset = 1L, + modality = "video", + double_precision = TRUE, + rope_type = "split", + num_attention_heads = 32L +) } \arguments{ \item{dim}{Integer. Rotary dimension (attention head dim x heads for diff --git a/man/ltx23_rotary_pos_embed_1d.Rd b/man/ltx23_rotary_pos_embed_1d.Rd index 92a9a63..1434eff 100644 --- a/man/ltx23_rotary_pos_embed_1d.Rd +++ b/man/ltx23_rotary_pos_embed_1d.Rd @@ -3,9 +3,14 @@ \alias{ltx23_rotary_pos_embed_1d} \title{1D rotary embeddings for the text connectors} \usage{ -ltx23_rotary_pos_embed_1d(dim, base_seq_len = 4096L, theta = 10000, - double_precision = TRUE, rope_type = "split", - num_attention_heads = 32L) +ltx23_rotary_pos_embed_1d( + dim, + base_seq_len = 4096L, + theta = 10000, + double_precision = TRUE, + rope_type = "split", + num_attention_heads = 32L +) } \arguments{ \item{dim}{Integer. Rotary dimension (connector inner dim).} diff --git a/man/ltx23_text_connectors.Rd b/man/ltx23_text_connectors.Rd index 73e21e1..fa0d29d 100644 --- a/man/ltx23_text_connectors.Rd +++ b/man/ltx23_text_connectors.Rd @@ -3,21 +3,27 @@ \alias{ltx23_text_connectors} \title{LTX-2.3 text connectors} \usage{ -ltx23_text_connectors(caption_channels = 3840L, text_proj_in_factor = 49L, - video_connector_num_attention_heads = 32L, - video_connector_attention_head_dim = 128L, - video_connector_num_layers = 8L, - video_connector_num_learnable_registers = 128L, - video_gated_attn = TRUE, - audio_connector_num_attention_heads = 32L, - audio_connector_attention_head_dim = 64L, - audio_connector_num_layers = 8L, - audio_connector_num_learnable_registers = 128L, - audio_gated_attn = TRUE, - connector_rope_base_seq_len = 4096L, rope_theta = 10000, - rope_double_precision = TRUE, rope_type = "split", - video_hidden_dim = 4096L, audio_hidden_dim = 2048L, - proj_bias = TRUE) +ltx23_text_connectors( + caption_channels = 3840L, + text_proj_in_factor = 49L, + video_connector_num_attention_heads = 32L, + video_connector_attention_head_dim = 128L, + video_connector_num_layers = 8L, + video_connector_num_learnable_registers = 128L, + video_gated_attn = TRUE, + audio_connector_num_attention_heads = 32L, + audio_connector_attention_head_dim = 64L, + audio_connector_num_layers = 8L, + audio_connector_num_learnable_registers = 128L, + audio_gated_attn = TRUE, + connector_rope_base_seq_len = 4096L, + rope_theta = 10000, + rope_double_precision = TRUE, + rope_type = "split", + video_hidden_dim = 4096L, + audio_hidden_dim = 2048L, + proj_bias = TRUE +) } \arguments{ \item{caption_channels}{Integer. Text encoder hidden size (3840 for diff --git a/man/ltx23_transformer.Rd b/man/ltx23_transformer.Rd index 2dcc039..4e2cf25 100644 --- a/man/ltx23_transformer.Rd +++ b/man/ltx23_transformer.Rd @@ -3,24 +3,43 @@ \alias{ltx23_transformer} \title{LTX-2.3 video transformer model} \usage{ -ltx23_transformer(in_channels = 128L, out_channels = 128L, patch_size = 1L, - patch_size_t = 1L, num_attention_heads = 32L, - attention_head_dim = 128L, cross_attention_dim = 4096L, - vae_scale_factors = c(8L, 32L, 32L), pos_embed_max_pos = 20L, - base_height = 2048L, base_width = 2048L, gated_attn = TRUE, - cross_attn_mod = TRUE, audio_in_channels = 128L, - audio_out_channels = 128L, audio_patch_size = 1L, - audio_patch_size_t = 1L, audio_num_attention_heads = 32L, - audio_attention_head_dim = 64L, - audio_cross_attention_dim = 2048L, audio_scale_factor = 4L, - audio_pos_embed_max_pos = 20L, audio_sampling_rate = 16000L, - audio_hop_length = 160L, audio_gated_attn = TRUE, - audio_cross_attn_mod = TRUE, num_layers = 48L, - norm_eps = 1e-06, rope_theta = 10000, - rope_double_precision = TRUE, causal_offset = 1L, - timestep_scale_multiplier = 1000, - cross_attn_timestep_scale_multiplier = 1000, - rope_type = "split", perturbed_attn = TRUE) +ltx23_transformer( + in_channels = 128L, + out_channels = 128L, + patch_size = 1L, + patch_size_t = 1L, + num_attention_heads = 32L, + attention_head_dim = 128L, + cross_attention_dim = 4096L, + vae_scale_factors = c(8L, 32L, 32L), + pos_embed_max_pos = 20L, + base_height = 2048L, + base_width = 2048L, + gated_attn = TRUE, + cross_attn_mod = TRUE, + audio_in_channels = 128L, + audio_out_channels = 128L, + audio_patch_size = 1L, + audio_patch_size_t = 1L, + audio_num_attention_heads = 32L, + audio_attention_head_dim = 64L, + audio_cross_attention_dim = 2048L, + audio_scale_factor = 4L, + audio_pos_embed_max_pos = 20L, + audio_sampling_rate = 16000L, + audio_hop_length = 160L, + audio_gated_attn = TRUE, + audio_cross_attn_mod = TRUE, + num_layers = 48L, + norm_eps = 1e-06, + rope_theta = 10000, + rope_double_precision = TRUE, + causal_offset = 1L, + timestep_scale_multiplier = 1000, + cross_attn_timestep_scale_multiplier = 1000, + rope_type = "split", + perturbed_attn = TRUE +) } \arguments{ \item{cross_attention_dim}{Integer. Video text embedding dimension.} diff --git a/man/ltx23_transformer_block.Rd b/man/ltx23_transformer_block.Rd index bf4c04f..ae190aa 100644 --- a/man/ltx23_transformer_block.Rd +++ b/man/ltx23_transformer_block.Rd @@ -3,14 +3,24 @@ \alias{ltx23_transformer_block} \title{LTX-2 transformer block} \usage{ -ltx23_transformer_block(dim, num_attention_heads, attention_head_dim, - cross_attention_dim, audio_dim, - audio_num_attention_heads, audio_attention_head_dim, - audio_cross_attention_dim, video_gated_attn = TRUE, - video_cross_attn_adaln = TRUE, audio_gated_attn = TRUE, - audio_cross_attn_adaln = TRUE, eps = 1e-06, - elementwise_affine = FALSE, rope_type = "split", - perturbed_attn = TRUE) +ltx23_transformer_block( + dim, + num_attention_heads, + attention_head_dim, + cross_attention_dim, + audio_dim, + audio_num_attention_heads, + audio_attention_head_dim, + audio_cross_attention_dim, + video_gated_attn = TRUE, + video_cross_attn_adaln = TRUE, + audio_gated_attn = TRUE, + audio_cross_attn_adaln = TRUE, + eps = 1e-06, + elementwise_affine = FALSE, + rope_type = "split", + perturbed_attn = TRUE +) } \arguments{ \item{cross_attention_dim}{Integer. Text embedding dim for video.} diff --git a/man/ltx23_tune_gc.Rd b/man/ltx23_tune_gc.Rd index ba91ec6..9aa575b 100644 --- a/man/ltx23_tune_gc.Rd +++ b/man/ltx23_tune_gc.Rd @@ -18,7 +18,7 @@ Invisibly, the applied reserved rate (NULL if skipped). Stops the allocator GC storm (cf. ~/skills/torch torch-jit-gc-performance.md): lantern proactively calls R's gc() whenever reserved memory exceeds \code{torch.cuda_allocator_reserved_rate} -(default 0.20) of the card. With ~75\\% of VRAM occupied by resident +(default 0.20) of the card. With ~75\% of VRAM occupied by resident weights that fires on nearly every allocation. Raising the rate to the actual footprint is safe here because the LTX hot loops compute into persistent scratch buffers (near-zero per-step garbage). Also raises diff --git a/man/ltx23_upsample1d.Rd b/man/ltx23_upsample1d.Rd index af2864e..8a2f840 100644 --- a/man/ltx23_upsample1d.Rd +++ b/man/ltx23_upsample1d.Rd @@ -3,8 +3,12 @@ \alias{ltx23_upsample1d} \title{Anti-aliasing 1D upsampler (transposed low-pass)} \usage{ -ltx23_upsample1d(ratio = 2L, kernel_size = NULL, window_type = "kaiser", - persistent = TRUE) +ltx23_upsample1d( + ratio = 2L, + kernel_size = NULL, + window_type = "kaiser", + persistent = TRUE +) } \arguments{ \item{ratio}{Integer. Upsampling ratio.} diff --git a/man/ltx23_video_decoder3d.Rd b/man/ltx23_video_decoder3d.Rd index 39204dc..645586d 100644 --- a/man/ltx23_video_decoder3d.Rd +++ b/man/ltx23_video_decoder3d.Rd @@ -3,15 +3,21 @@ \alias{ltx23_video_decoder3d} \title{LTX-2.3 video decoder} \usage{ -ltx23_video_decoder3d(in_channels = 128L, out_channels = 3L, - block_out_channels = c(256L, 512L, 512L, 1024L), - spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), - layers_per_block = c(4L, 6L, 4L, 2L, 2L), - upsample_type = NULL, patch_size = 4L, patch_size_t = 1L, - resnet_norm_eps = 1e-06, is_causal = FALSE, - upsample_residual = c(FALSE, FALSE, FALSE, FALSE), - upsample_factor = c(2L, 2L, 1L, 2L), - spatial_padding_mode = "zeros") +ltx23_video_decoder3d( + in_channels = 128L, + out_channels = 3L, + block_out_channels = c(256L, 512L, 512L, 1024L), + spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), + layers_per_block = c(4L, 6L, 4L, 2L, 2L), + upsample_type = NULL, + patch_size = 4L, + patch_size_t = 1L, + resnet_norm_eps = 1e-06, + is_causal = FALSE, + upsample_residual = c(FALSE, FALSE, FALSE, FALSE), + upsample_factor = c(2L, 2L, 1L, 2L), + spatial_padding_mode = "zeros" +) } \arguments{ \item{block_out_channels}{Integer vector (config order).} diff --git a/man/ltx23_video_down_block3d.Rd b/man/ltx23_video_down_block3d.Rd index 1841b4e..a8e904e 100644 --- a/man/ltx23_video_down_block3d.Rd +++ b/man/ltx23_video_down_block3d.Rd @@ -3,10 +3,15 @@ \alias{ltx23_video_down_block3d} \title{LTX video down block} \usage{ -ltx23_video_down_block3d(in_channels, out_channels = NULL, num_layers = 1L, - resnet_eps = 1e-06, spatio_temporal_scale = TRUE, - downsample_type = "spatiotemporal", - spatial_padding_mode = "zeros") +ltx23_video_down_block3d( + in_channels, + out_channels = NULL, + num_layers = 1L, + resnet_eps = 1e-06, + spatio_temporal_scale = TRUE, + downsample_type = "spatiotemporal", + spatial_padding_mode = "zeros" +) } \arguments{ \item{num_layers}{Integer. ResNet count.} diff --git a/man/ltx23_video_downsampler3d.Rd b/man/ltx23_video_downsampler3d.Rd index 3203165..c8225f7 100644 --- a/man/ltx23_video_downsampler3d.Rd +++ b/man/ltx23_video_downsampler3d.Rd @@ -3,8 +3,12 @@ \alias{ltx23_video_downsampler3d} \title{Pixel-unshuffle 3D downsampler} \usage{ -ltx23_video_downsampler3d(in_channels, out_channels, stride = c(1L, 1L, 1L), - spatial_padding_mode = "zeros") +ltx23_video_downsampler3d( + in_channels, + out_channels, + stride = c(1L, 1L, 1L), + spatial_padding_mode = "zeros" +) } \arguments{ \item{stride}{Length-3 integer vector (t, h, w).} diff --git a/man/ltx23_video_encoder3d.Rd b/man/ltx23_video_encoder3d.Rd index ee9702a..1ad868e 100644 --- a/man/ltx23_video_encoder3d.Rd +++ b/man/ltx23_video_encoder3d.Rd @@ -3,13 +3,19 @@ \alias{ltx23_video_encoder3d} \title{LTX-2.3 video encoder} \usage{ -ltx23_video_encoder3d(in_channels = 3L, out_channels = 128L, - block_out_channels = c(256L, 512L, 1024L, 1024L), - spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), - layers_per_block = c(4L, 6L, 4L, 2L, 2L), - downsample_type = NULL, patch_size = 4L, - patch_size_t = 1L, resnet_norm_eps = 1e-06, - is_causal = TRUE, spatial_padding_mode = "zeros") +ltx23_video_encoder3d( + in_channels = 3L, + out_channels = 128L, + block_out_channels = c(256L, 512L, 1024L, 1024L), + spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), + layers_per_block = c(4L, 6L, 4L, 2L, 2L), + downsample_type = NULL, + patch_size = 4L, + patch_size_t = 1L, + resnet_norm_eps = 1e-06, + is_causal = TRUE, + spatial_padding_mode = "zeros" +) } \arguments{ \item{block_out_channels}{Integer vector. Per-block output channels.} diff --git a/man/ltx23_video_mid_block3d.Rd b/man/ltx23_video_mid_block3d.Rd index dba8e4c..bc9771b 100644 --- a/man/ltx23_video_mid_block3d.Rd +++ b/man/ltx23_video_mid_block3d.Rd @@ -3,8 +3,12 @@ \alias{ltx23_video_mid_block3d} \title{LTX video mid block} \usage{ -ltx23_video_mid_block3d(in_channels, num_layers = 1L, resnet_eps = 1e-06, - spatial_padding_mode = "zeros") +ltx23_video_mid_block3d( + in_channels, + num_layers = 1L, + resnet_eps = 1e-06, + spatial_padding_mode = "zeros" +) } \arguments{ \item{in_channels}{Integer.} diff --git a/man/ltx23_video_resnet_block3d.Rd b/man/ltx23_video_resnet_block3d.Rd index bdb7636..c4fffe7 100644 --- a/man/ltx23_video_resnet_block3d.Rd +++ b/man/ltx23_video_resnet_block3d.Rd @@ -3,8 +3,12 @@ \alias{ltx23_video_resnet_block3d} \title{LTX 3D ResNet block} \usage{ -ltx23_video_resnet_block3d(in_channels, out_channels = NULL, eps = 1e-06, - spatial_padding_mode = "zeros") +ltx23_video_resnet_block3d( + in_channels, + out_channels = NULL, + eps = 1e-06, + spatial_padding_mode = "zeros" +) } \arguments{ \item{eps}{Numeric. Shortcut LayerNorm epsilon.} diff --git a/man/ltx23_video_up_block3d.Rd b/man/ltx23_video_up_block3d.Rd index 2cc16af..30f8228 100644 --- a/man/ltx23_video_up_block3d.Rd +++ b/man/ltx23_video_up_block3d.Rd @@ -3,11 +3,17 @@ \alias{ltx23_video_up_block3d} \title{LTX video up block} \usage{ -ltx23_video_up_block3d(in_channels, out_channels = NULL, num_layers = 1L, - resnet_eps = 1e-06, spatio_temporal_scale = TRUE, - upsample_type = "spatiotemporal", - upsample_residual = FALSE, upscale_factor = 1L, - spatial_padding_mode = "zeros") +ltx23_video_up_block3d( + in_channels, + out_channels = NULL, + num_layers = 1L, + resnet_eps = 1e-06, + spatio_temporal_scale = TRUE, + upsample_type = "spatiotemporal", + upsample_residual = FALSE, + upscale_factor = 1L, + spatial_padding_mode = "zeros" +) } \arguments{ \item{num_layers}{Integer.} diff --git a/man/ltx23_video_upsampler3d.Rd b/man/ltx23_video_upsampler3d.Rd index c060011..1862804 100644 --- a/man/ltx23_video_upsampler3d.Rd +++ b/man/ltx23_video_upsampler3d.Rd @@ -3,8 +3,13 @@ \alias{ltx23_video_upsampler3d} \title{Pixel-shuffle 3D upsampler} \usage{ -ltx23_video_upsampler3d(in_channels, stride = c(1L, 1L, 1L), residual = FALSE, - upscale_factor = 1L, spatial_padding_mode = "zeros") +ltx23_video_upsampler3d( + in_channels, + stride = c(1L, 1L, 1L), + residual = FALSE, + upscale_factor = 1L, + spatial_padding_mode = "zeros" +) } \arguments{ \item{in_channels}{Integer.} diff --git a/man/ltx23_video_vae.Rd b/man/ltx23_video_vae.Rd index 6f673d2..3b980ab 100644 --- a/man/ltx23_video_vae.Rd +++ b/man/ltx23_video_vae.Rd @@ -3,20 +3,28 @@ \alias{ltx23_video_vae} \title{LTX-2.3 video VAE} \usage{ -ltx23_video_vae(in_channels = 3L, out_channels = 3L, latent_channels = 128L, - block_out_channels = c(256L, 512L, 1024L, 1024L), - decoder_block_out_channels = c(256L, 512L, 512L, 1024L), - layers_per_block = c(4L, 6L, 4L, 2L, 2L), - decoder_layers_per_block = c(4L, 6L, 4L, 2L, 2L), - spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), - decoder_spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), - downsample_type = NULL, upsample_type = NULL, - upsample_residual = c(FALSE, FALSE, FALSE, FALSE), - upsample_factor = c(2L, 2L, 1L, 2L), patch_size = 4L, - patch_size_t = 1L, resnet_norm_eps = 1e-06, - encoder_causal = TRUE, decoder_causal = FALSE, - encoder_spatial_padding_mode = "zeros", - decoder_spatial_padding_mode = "zeros") +ltx23_video_vae( + in_channels = 3L, + out_channels = 3L, + latent_channels = 128L, + block_out_channels = c(256L, 512L, 1024L, 1024L), + decoder_block_out_channels = c(256L, 512L, 512L, 1024L), + layers_per_block = c(4L, 6L, 4L, 2L, 2L), + decoder_layers_per_block = c(4L, 6L, 4L, 2L, 2L), + spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), + decoder_spatio_temporal_scaling = c(TRUE, TRUE, TRUE, TRUE), + downsample_type = NULL, + upsample_type = NULL, + upsample_residual = c(FALSE, FALSE, FALSE, FALSE), + upsample_factor = c(2L, 2L, 1L, 2L), + patch_size = 4L, + patch_size_t = 1L, + resnet_norm_eps = 1e-06, + encoder_causal = TRUE, + decoder_causal = FALSE, + encoder_spatial_padding_mode = "zeros", + decoder_spatial_padding_mode = "zeros" +) } \arguments{ \item{latent_channels}{Integer.} diff --git a/man/ltx23_vocoder.Rd b/man/ltx23_vocoder.Rd index 78dfcbb..f034f4d 100644 --- a/man/ltx23_vocoder.Rd +++ b/man/ltx23_vocoder.Rd @@ -3,13 +3,18 @@ \alias{ltx23_vocoder} \title{LTX-2.3 vocoder stage} \usage{ -ltx23_vocoder(in_channels = 128L, hidden_channels = 1536L, out_channels = 2L, - upsample_kernel_sizes = c(11L, 4L, 4L, 4L, 4L, 4L), - upsample_factors = c(5L, 2L, 2L, 2L, 2L, 2L), - resnet_kernel_sizes = c(3L, 7L, 11L), - resnet_dilations = list(c(1L, 3L, 5L), c(1L, 3L, 5L), c(1L, 3L, 5L)), - antialias_ratio = 2L, antialias_kernel_size = 12L, - final_bias = FALSE) +ltx23_vocoder( + in_channels = 128L, + hidden_channels = 1536L, + out_channels = 2L, + upsample_kernel_sizes = c(11L, 4L, 4L, 4L, 4L, 4L), + upsample_factors = c(5L, 2L, 2L, 2L, 2L, 2L), + resnet_kernel_sizes = c(3L, 7L, 11L), + resnet_dilations = list(c(1L, 3L, 5L), c(1L, 3L, 5L), c(1L, 3L, 5L)), + antialias_ratio = 2L, + antialias_kernel_size = 12L, + final_bias = FALSE +) } \arguments{ \item{in_channels}{Integer. Flattened input channels (C * mel bins / 1).} diff --git a/man/ltx23_vocoder_resblock.Rd b/man/ltx23_vocoder_resblock.Rd index 1d6abff..6e83a50 100644 --- a/man/ltx23_vocoder_resblock.Rd +++ b/man/ltx23_vocoder_resblock.Rd @@ -3,8 +3,13 @@ \alias{ltx23_vocoder_resblock} \title{Vocoder ResNet block (AMP)} \usage{ -ltx23_vocoder_resblock(channels, kernel_size = 3L, dilations = c(1L, 3L, 5L), - antialias_ratio = 2L, antialias_kernel_size = 12L) +ltx23_vocoder_resblock( + channels, + kernel_size = 3L, + dilations = c(1L, 3L, 5L), + antialias_ratio = 2L, + antialias_kernel_size = 12L +) } \arguments{ \item{channels}{Integer.} diff --git a/man/ltx23_vocoder_with_bwe.Rd b/man/ltx23_vocoder_with_bwe.Rd index b5c8f93..f6263be 100644 --- a/man/ltx23_vocoder_with_bwe.Rd +++ b/man/ltx23_vocoder_with_bwe.Rd @@ -3,20 +3,27 @@ \alias{ltx23_vocoder_with_bwe} \title{LTX-2.3 vocoder with bandwidth extension} \usage{ -ltx23_vocoder_with_bwe(in_channels = 128L, hidden_channels = 1536L, - out_channels = 2L, - upsample_kernel_sizes = c(11L, 4L, 4L, 4L, 4L, 4L), - upsample_factors = c(5L, 2L, 2L, 2L, 2L, 2L), - resnet_kernel_sizes = c(3L, 7L, 11L), - resnet_dilations = NULL, bwe_in_channels = 128L, - bwe_hidden_channels = 512L, - bwe_upsample_kernel_sizes = c(12L, 11L, 4L, 4L, 4L), - bwe_upsample_factors = c(6L, 5L, 2L, 2L, 2L), - bwe_resnet_kernel_sizes = c(3L, 7L, 11L), - bwe_resnet_dilations = NULL, filter_length = 512L, - hop_length = 80L, window_length = 512L, - num_mel_channels = 64L, input_sampling_rate = 16000L, - output_sampling_rate = 48000L) +ltx23_vocoder_with_bwe( + in_channels = 128L, + hidden_channels = 1536L, + out_channels = 2L, + upsample_kernel_sizes = c(11L, 4L, 4L, 4L, 4L, 4L), + upsample_factors = c(5L, 2L, 2L, 2L, 2L, 2L), + resnet_kernel_sizes = c(3L, 7L, 11L), + resnet_dilations = NULL, + bwe_in_channels = 128L, + bwe_hidden_channels = 512L, + bwe_upsample_kernel_sizes = c(12L, 11L, 4L, 4L, 4L), + bwe_upsample_factors = c(6L, 5L, 2L, 2L, 2L), + bwe_resnet_kernel_sizes = c(3L, 7L, 11L), + bwe_resnet_dilations = NULL, + filter_length = 512L, + hop_length = 80L, + window_length = 512L, + num_mel_channels = 64L, + input_sampling_rate = 16000L, + output_sampling_rate = 48000L +) } \arguments{ \item{out_channels}{Integer. Audio channels.} diff --git a/man/models2devices.Rd b/man/models2devices.Rd index 607e1b6..4bee2f4 100644 --- a/man/models2devices.Rd +++ b/man/models2devices.Rd @@ -3,8 +3,12 @@ \alias{models2devices} \title{models2devices} \usage{ -models2devices(model_name, devices = "cpu", unet_dtype_str = NULL, - download_models = FALSE) +models2devices( + model_name, + devices = "cpu", + unet_dtype_str = NULL, + download_models = FALSE +) } \arguments{ \item{model_name}{A character string representing the name of the model to be used.} diff --git a/man/qwen3_encoder.Rd b/man/qwen3_encoder.Rd index 68232d0..1e3dafc 100644 --- a/man/qwen3_encoder.Rd +++ b/man/qwen3_encoder.Rd @@ -3,10 +3,17 @@ \alias{qwen3_encoder} \title{Qwen3 encoder stack} \usage{ -qwen3_encoder(vocab_size = 151936L, hidden_size = 2560L, - intermediate_size = 9728L, num_hidden_layers = 36L, - num_attention_heads = 32L, num_key_value_heads = 8L, - head_dim = 128L, rope_theta = 1e+06, rms_norm_eps = 1e-06) +qwen3_encoder( + vocab_size = 151936L, + hidden_size = 2560L, + intermediate_size = 9728L, + num_hidden_layers = 36L, + num_attention_heads = 32L, + num_key_value_heads = 8L, + head_dim = 128L, + rope_theta = 1e+06, + rms_norm_eps = 1e-06 +) } \arguments{ \item{rope_theta}{Numeric.} diff --git a/man/recommend.Rd b/man/recommend.Rd index 74c3963..b00f9b1 100644 --- a/man/recommend.Rd +++ b/man/recommend.Rd @@ -3,8 +3,12 @@ \alias{recommend} \title{Recommend a precision and device configuration for a model} \usage{ -recommend(model = c("sd21", "sdxl", "flux1", "flux2", "zimage", "ltx"), - vram_gb = NULL, st_caps = NULL, host_ram_gb = NULL) +recommend( + model = c("sd21", "sdxl", "flux1", "flux2", "zimage", "ltx"), + vram_gb = NULL, + st_caps = NULL, + host_ram_gb = NULL +) } \arguments{ \item{model}{"sd21", "sdxl", "flux1", "flux2", "zimage", or "ltx".} diff --git a/man/reshard_safetensors.Rd b/man/reshard_safetensors.Rd index 1f01841..ef470d1 100644 --- a/man/reshard_safetensors.Rd +++ b/man/reshard_safetensors.Rd @@ -3,8 +3,13 @@ \alias{reshard_safetensors} \title{Re-shard a large safetensors file into sub-2 GB shards} \usage{ -reshard_safetensors(input, output_dir, base = "diffusion_pytorch_model", - shard_bytes = 1.9e+09, verbose = TRUE) +reshard_safetensors( + input, + output_dir, + base = "diffusion_pytorch_model", + shard_bytes = 1.9e+09, + verbose = TRUE +) } \arguments{ \item{input}{Path to the source \code{.safetensors} file, or a diff --git a/man/resident_load.Rd b/man/resident_load.Rd index da4bb2d..0aa1902 100644 --- a/man/resident_load.Rd +++ b/man/resident_load.Rd @@ -3,8 +3,12 @@ \alias{resident_load} \title{Load a diffusion pipeline as a resident handle} \usage{ -resident_load(model = c("flux2", "flux1", "zimage", "ltx"), device = "cuda", - ..., verbose = TRUE) +resident_load( + model = c("flux2", "flux1", "zimage", "ltx"), + device = "cuda", + ..., + verbose = TRUE +) } \arguments{ \item{model}{One of "flux1", "flux2", "zimage", "ltx".} diff --git a/man/save_video.Rd b/man/save_video.Rd index e14d3c2..bd91605 100644 --- a/man/save_video.Rd +++ b/man/save_video.Rd @@ -3,8 +3,15 @@ \alias{save_video} \title{Save Video to File} \usage{ -save_video(video, file, fps = 24, format = NULL, backend = "auto", - quality = 85, verbose = TRUE) +save_video( + video, + file, + fps = 24, + format = NULL, + backend = "auto", + quality = 85, + verbose = TRUE +) } \arguments{ \item{video}{Array of video frames with shape [T, H, W, C] where C is 3 (RGB). diff --git a/man/save_video_ffmpeg.Rd b/man/save_video_ffmpeg.Rd index 03ceca9..71acd55 100644 --- a/man/save_video_ffmpeg.Rd +++ b/man/save_video_ffmpeg.Rd @@ -3,8 +3,14 @@ \alias{save_video_ffmpeg} \title{Save Video using FFmpeg} \usage{ -save_video_ffmpeg(video, file, fps = 24, format = "mp4", quality = 85, - verbose = TRUE) +save_video_ffmpeg( + video, + file, + fps = 24, + format = "mp4", + quality = 85, + verbose = TRUE +) } \arguments{ \item{video}{Array of video frames [T, H, W, C].} diff --git a/man/save_video_ltx23.Rd b/man/save_video_ltx23.Rd index 21eb7aa..75db507 100644 --- a/man/save_video_ltx23.Rd +++ b/man/save_video_ltx23.Rd @@ -3,8 +3,14 @@ \alias{save_video_ltx23} \title{Save an LTX video (optionally with audio) to MP4} \usage{ -save_video_ltx23(video, filename, fps = 24, audio = NULL, sample_rate = 48000L, - verbose = TRUE) +save_video_ltx23( + video, + filename, + fps = 24, + audio = NULL, + sample_rate = 48000L, + verbose = TRUE +) } \arguments{ \item{video}{Array [frames, height, width, 3] in [0, 1].} diff --git a/man/sd_pipeline_from_safetensors.Rd b/man/sd_pipeline_from_safetensors.Rd index 5be6fe7..63dec7c 100644 --- a/man/sd_pipeline_from_safetensors.Rd +++ b/man/sd_pipeline_from_safetensors.Rd @@ -3,8 +3,13 @@ \alias{sd_pipeline_from_safetensors} \title{Assemble a native SD pipeline from a diffusers safetensors directory} \usage{ -sd_pipeline_from_safetensors(diffusers_dir, model_name = "sd21", - devices = NULL, unet_dtype = NULL, verbose = TRUE) +sd_pipeline_from_safetensors( + diffusers_dir, + model_name = "sd21", + devices = NULL, + unet_dtype = NULL, + verbose = TRUE +) } \arguments{ \item{diffusers_dir}{Directory with \code{unet/}, \code{vae/}, diff --git a/man/sdxl_pipeline_from_safetensors.Rd b/man/sdxl_pipeline_from_safetensors.Rd index f99b76e..0360370 100644 --- a/man/sdxl_pipeline_from_safetensors.Rd +++ b/man/sdxl_pipeline_from_safetensors.Rd @@ -3,8 +3,12 @@ \alias{sdxl_pipeline_from_safetensors} \title{Assemble a native SDXL pipeline from a diffusers safetensors directory} \usage{ -sdxl_pipeline_from_safetensors(diffusers_dir, devices = NULL, - unet_dtype = NULL, verbose = TRUE) +sdxl_pipeline_from_safetensors( + diffusers_dir, + devices = NULL, + unet_dtype = NULL, + verbose = TRUE +) } \arguments{ \item{diffusers_dir}{Directory with \code{unet/}, \code{vae/}, diff --git a/man/serve.Rd b/man/serve.Rd index e1bdfe2..c88d3b2 100644 --- a/man/serve.Rd +++ b/man/serve.Rd @@ -3,10 +3,20 @@ \alias{serve} \title{Serve diffuseR over HTTP} \usage{ -serve(port = 7812L, model = c("flux2", "zimage", "flux1", "ltx"), - device = "cuda", token = NULL, max_pixels = 1024L^2, max_frames = 161L, - max_steps = 50L, max_pixel_frames = NULL, max_prompts = 32L, - timeout = 300L, max_body = 1024L^2, warmup = TRUE) +serve( + port = 7812L, + model = c("flux2", "zimage", "flux1", "ltx"), + device = "cuda", + token = NULL, + max_pixels = 1024L^2, + max_frames = 161L, + max_steps = 50L, + max_pixel_frames = NULL, + max_prompts = 32L, + timeout = 300L, + max_body = 1024L^2, + warmup = TRUE +) } \arguments{ \item{port}{Integer. TCP port. Default 7812 (cornball serve range: whisper 7809, chatterbox 7810, qwen3 TTS 7811).} diff --git a/man/t5_encoder.Rd b/man/t5_encoder.Rd index a41cf1b..462ac39 100644 --- a/man/t5_encoder.Rd +++ b/man/t5_encoder.Rd @@ -3,10 +3,17 @@ \alias{t5_encoder} \title{T5 encoder stack} \usage{ -t5_encoder(vocab_size = 32128L, d_model = 4096L, d_kv = 64L, num_heads = 64L, - d_ff = 10240L, num_layers = 24L, - relative_attention_num_buckets = 32L, - relative_attention_max_distance = 128L, layer_norm_epsilon = 1e-06) +t5_encoder( + vocab_size = 32128L, + d_model = 4096L, + d_kv = 64L, + num_heads = 64L, + d_ff = 10240L, + num_layers = 24L, + relative_attention_num_buckets = 32L, + relative_attention_max_distance = 128L, + layer_norm_epsilon = 1e-06 +) } \arguments{ \item{layer_norm_epsilon}{Numeric.} diff --git a/man/text_encoder2_native.Rd b/man/text_encoder2_native.Rd index f9a7563..625e548 100644 --- a/man/text_encoder2_native.Rd +++ b/man/text_encoder2_native.Rd @@ -3,9 +3,15 @@ \alias{text_encoder2_native} \title{Native CLIP Text Encoder 2 (OpenCLIP ViT-bigG for SDXL)} \usage{ -text_encoder2_native(vocab_size = 49408, context_length = 77, embed_dim = 1280, - num_layers = 32, num_heads = 20, mlp_dim = 5120, - return_penultimate = FALSE) +text_encoder2_native( + vocab_size = 49408, + context_length = 77, + embed_dim = 1280, + num_layers = 32, + num_heads = 20, + mlp_dim = 5120, + return_penultimate = FALSE +) } \arguments{ \item{vocab_size}{Vocabulary size (default 49408)} diff --git a/man/text_encoder2_native_from_safetensors.Rd b/man/text_encoder2_native_from_safetensors.Rd index 0fc0cf3..771ca9b 100644 --- a/man/text_encoder2_native_from_safetensors.Rd +++ b/man/text_encoder2_native_from_safetensors.Rd @@ -3,8 +3,12 @@ \alias{text_encoder2_native_from_safetensors} \title{Build a native SDXL text encoder 2 from a diffusers safetensors directory} \usage{ -text_encoder2_native_from_safetensors(path, return_penultimate = TRUE, - verbose = TRUE, ...) +text_encoder2_native_from_safetensors( + path, + return_penultimate = TRUE, + verbose = TRUE, + ... +) } \arguments{ \item{path}{diffusers text_encoder_2 directory (config.json + diff --git a/man/text_encoder_native.Rd b/man/text_encoder_native.Rd index e7d1d37..8535526 100644 --- a/man/text_encoder_native.Rd +++ b/man/text_encoder_native.Rd @@ -3,10 +3,17 @@ \alias{text_encoder_native} \title{Native CLIP Text Encoder} \usage{ -text_encoder_native(vocab_size = 49408, context_length = 77, embed_dim = 768, - num_layers = 12, num_heads = 12, mlp_dim = 3072, - apply_final_ln = TRUE, return_penultimate = FALSE, - gelu_type = "tanh") +text_encoder_native( + vocab_size = 49408, + context_length = 77, + embed_dim = 768, + num_layers = 12, + num_heads = 12, + mlp_dim = 3072, + apply_final_ln = TRUE, + return_penultimate = FALSE, + gelu_type = "tanh" +) } \arguments{ \item{vocab_size}{Vocabulary size (default 49408)} diff --git a/man/text_encoder_native_from_safetensors.Rd b/man/text_encoder_native_from_safetensors.Rd index 35450d0..8967818 100644 --- a/man/text_encoder_native_from_safetensors.Rd +++ b/man/text_encoder_native_from_safetensors.Rd @@ -3,8 +3,12 @@ \alias{text_encoder_native_from_safetensors} \title{Build a native CLIP text encoder from a diffusers safetensors directory} \usage{ -text_encoder_native_from_safetensors(path, apply_final_ln = TRUE, - verbose = TRUE, ...) +text_encoder_native_from_safetensors( + path, + apply_final_ln = TRUE, + verbose = TRUE, + ... +) } \arguments{ \item{path}{diffusers text_encoder directory (config.json + diff --git a/man/timestep_embedding.Rd b/man/timestep_embedding.Rd index f357184..cdc0bd8 100644 --- a/man/timestep_embedding.Rd +++ b/man/timestep_embedding.Rd @@ -3,8 +3,12 @@ \alias{timestep_embedding} \title{Sinusoidal Timestep Embedding} \usage{ -timestep_embedding(timesteps, dim, flip_sin_to_cos = TRUE, - downscale_freq_shift = 0L) +timestep_embedding( + timesteps, + dim, + flip_sin_to_cos = TRUE, + downscale_freq_shift = 0L +) } \arguments{ \item{timesteps}{Tensor of timesteps (batch_size,)} diff --git a/man/tokenize_gemma3.Rd b/man/tokenize_gemma3.Rd index c939dd4..98c5a34 100644 --- a/man/tokenize_gemma3.Rd +++ b/man/tokenize_gemma3.Rd @@ -3,8 +3,13 @@ \alias{tokenize_gemma3} \title{Tokenize text for Gemma3} \usage{ -tokenize_gemma3(tokenizer, text, max_length = 1024L, padding = "max_length", - return_tensors = "pt") +tokenize_gemma3( + tokenizer, + text, + max_length = 1024L, + padding = "max_length", + return_tensors = "pt" +) } \arguments{ \item{tokenizer}{Gemma3 tokenizer object.} diff --git a/man/txt2img.Rd b/man/txt2img.Rd index 1557468..779013d 100644 --- a/man/txt2img.Rd +++ b/man/txt2img.Rd @@ -3,7 +3,11 @@ \alias{txt2img} \title{Generate an image from a text prompt using a diffusion pipeline} \usage{ -txt2img(prompt, model_name = c("sd21", "sdxl", "flux1", "flux2", "zimage"), ...) +txt2img( + prompt, + model_name = c("sd21", "sdxl", "flux1", "flux2", "zimage"), + ... +) } \arguments{ \item{prompt}{A character string prompt describing the image to generate.} diff --git a/man/txt2img_flux.Rd b/man/txt2img_flux.Rd index 6a22116..9e768cf 100644 --- a/man/txt2img_flux.Rd +++ b/man/txt2img_flux.Rd @@ -3,10 +3,21 @@ \alias{txt2img_flux} \title{Generate an image with FLUX.1-schnell} \usage{ -txt2img_flux(prompt, pipeline = NULL, width = 1024L, height = 1024L, - num_inference_steps = 4L, max_sequence_length = 256L, seed = NULL, - prompt_embeds = NULL, pooled_prompt_embeds = NULL, - save_file = TRUE, filename = NULL, verbose = TRUE, ...) +txt2img_flux( + prompt, + pipeline = NULL, + width = 1024L, + height = 1024L, + num_inference_steps = 4L, + max_sequence_length = 256L, + seed = NULL, + prompt_embeds = NULL, + pooled_prompt_embeds = NULL, + save_file = TRUE, + filename = NULL, + verbose = TRUE, + ... +) } \arguments{ \item{prompt}{Character. The prompt.} diff --git a/man/txt2img_flux2.Rd b/man/txt2img_flux2.Rd index 57de842..15fef77 100644 --- a/man/txt2img_flux2.Rd +++ b/man/txt2img_flux2.Rd @@ -3,10 +3,20 @@ \alias{txt2img_flux2} \title{Generate an image with FLUX.2 klein} \usage{ -txt2img_flux2(prompt, pipeline = NULL, width = 1024L, height = 1024L, - num_inference_steps = 4L, max_sequence_length = 512L, - seed = NULL, prompt_embeds = NULL, save_file = TRUE, - filename = NULL, verbose = TRUE, ...) +txt2img_flux2( + prompt, + pipeline = NULL, + width = 1024L, + height = 1024L, + num_inference_steps = 4L, + max_sequence_length = 512L, + seed = NULL, + prompt_embeds = NULL, + save_file = TRUE, + filename = NULL, + verbose = TRUE, + ... +) } \arguments{ \item{prompt}{Character. The prompt.} diff --git a/man/txt2img_sd21.Rd b/man/txt2img_sd21.Rd index 4549222..612b8b4 100644 --- a/man/txt2img_sd21.Rd +++ b/man/txt2img_sd21.Rd @@ -3,13 +3,29 @@ \alias{txt2img_sd21} \title{Generate an image from a text prompt using a diffusion pipeline} \usage{ -txt2img_sd21(prompt, negative_prompt = NULL, img_dim = 768, pipeline = NULL, - devices = "auto", unet_dtype_str = NULL, download_models = FALSE, - scheduler = "ddim", timesteps = NULL, initial_latents = NULL, - num_inference_steps = 50, guidance_scale = 7.5, seed = NULL, - save_file = TRUE, filename = NULL, metadata_path = NULL, - use_native_decoder = FALSE, use_native_text_encoder = FALSE, - use_native_unet = FALSE, diffusers_dir = NULL, ...) +txt2img_sd21( + prompt, + negative_prompt = NULL, + img_dim = 768, + pipeline = NULL, + devices = "auto", + unet_dtype_str = NULL, + download_models = FALSE, + scheduler = "ddim", + timesteps = NULL, + initial_latents = NULL, + num_inference_steps = 50, + guidance_scale = 7.5, + seed = NULL, + save_file = TRUE, + filename = NULL, + metadata_path = NULL, + use_native_decoder = FALSE, + use_native_text_encoder = FALSE, + use_native_unet = FALSE, + diffusers_dir = NULL, + ... +) } \arguments{ \item{prompt}{A character string prompt describing the image to generate.} diff --git a/man/txt2img_sdxl.Rd b/man/txt2img_sdxl.Rd index af3cb6e..508198e 100644 --- a/man/txt2img_sdxl.Rd +++ b/man/txt2img_sdxl.Rd @@ -3,14 +3,31 @@ \alias{txt2img_sdxl} \title{Generate an image from a text prompt using SDXL} \usage{ -txt2img_sdxl(prompt, negative_prompt = NULL, img_dim = 1024, pipeline = NULL, - devices = "auto", memory_profile = NULL, unet_dtype_str = NULL, - download_models = FALSE, scheduler = "ddim", timesteps = NULL, - initial_latents = NULL, num_inference_steps = 30, - guidance_scale = 7.5, seed = NULL, save_file = TRUE, - filename = NULL, metadata_path = NULL, use_native_decoder = FALSE, - use_native_text_encoder = FALSE, use_native_unet = FALSE, - diffusers_dir = NULL, verbose = TRUE, ...) +txt2img_sdxl( + prompt, + negative_prompt = NULL, + img_dim = 1024, + pipeline = NULL, + devices = "auto", + memory_profile = NULL, + unet_dtype_str = NULL, + download_models = FALSE, + scheduler = "ddim", + timesteps = NULL, + initial_latents = NULL, + num_inference_steps = 30, + guidance_scale = 7.5, + seed = NULL, + save_file = TRUE, + filename = NULL, + metadata_path = NULL, + use_native_decoder = FALSE, + use_native_text_encoder = FALSE, + use_native_unet = FALSE, + diffusers_dir = NULL, + verbose = TRUE, + ... +) } \arguments{ \item{prompt}{A character string prompt describing the image to generate.} diff --git a/man/txt2img_zimage.Rd b/man/txt2img_zimage.Rd index 2456e42..063f338 100644 --- a/man/txt2img_zimage.Rd +++ b/man/txt2img_zimage.Rd @@ -3,10 +3,20 @@ \alias{txt2img_zimage} \title{Generate an image with Z-Image-Turbo} \usage{ -txt2img_zimage(prompt, pipeline = NULL, width = 1024L, height = 1024L, - num_inference_steps = 8L, max_sequence_length = 512L, - seed = NULL, prompt_embeds = NULL, save_file = TRUE, - filename = NULL, verbose = TRUE, ...) +txt2img_zimage( + prompt, + pipeline = NULL, + width = 1024L, + height = 1024L, + num_inference_steps = 8L, + max_sequence_length = 512L, + seed = NULL, + prompt_embeds = NULL, + save_file = TRUE, + filename = NULL, + verbose = TRUE, + ... +) } \arguments{ \item{prompt}{Character. The prompt.} diff --git a/man/txt2vid_ltx2.Rd b/man/txt2vid_ltx2.Rd index ff5c62d..ff5f978 100644 --- a/man/txt2vid_ltx2.Rd +++ b/man/txt2vid_ltx2.Rd @@ -3,18 +3,41 @@ \alias{txt2vid_ltx2} \title{Generate video (and audio) with LTX-2.3} \usage{ -txt2vid_ltx2(prompt, pipeline, text_encoder = NULL, tokenizer = NULL, - prompt_embeds = NULL, connector_embeds = NULL, width = 768L, - height = 512L, num_frames = 121L, frame_rate = 24, - sigmas = ltx23_distilled_sigmas(), guidance_scale = 1, - seed = NULL, device = "cuda", dtype = "bfloat16", filename = NULL, - max_sequence_length = 1024L, decode_video = TRUE, - decode_audio = TRUE, two_stage = FALSE, upsampler = NULL, - adain_factor = 1, tone_map_compression = 0, phase_offload = TRUE, - image = NULL, condition_video = NULL, conditioning_frames = 9L, - cond_noise_scale = 0, condition_latents = NULL, - resident = character(), trim_frames = 0L, audio = NULL, - verbose = TRUE) +txt2vid_ltx2( + prompt, + pipeline, + text_encoder = NULL, + tokenizer = NULL, + prompt_embeds = NULL, + connector_embeds = NULL, + width = 768L, + height = 512L, + num_frames = 121L, + frame_rate = 24, + sigmas = ltx23_distilled_sigmas(), + guidance_scale = 1, + seed = NULL, + device = "cuda", + dtype = "bfloat16", + filename = NULL, + max_sequence_length = 1024L, + decode_video = TRUE, + decode_audio = TRUE, + two_stage = FALSE, + upsampler = NULL, + adain_factor = 1, + tone_map_compression = 0, + phase_offload = TRUE, + image = NULL, + condition_video = NULL, + conditioning_frames = 9L, + cond_noise_scale = 0, + condition_latents = NULL, + resident = character(), + trim_frames = 0L, + audio = NULL, + verbose = TRUE +) } \arguments{ \item{prompt}{Character. The prompt.} diff --git a/man/unet_native.Rd b/man/unet_native.Rd index d5f70f9..df9d8a0 100644 --- a/man/unet_native.Rd +++ b/man/unet_native.Rd @@ -3,10 +3,14 @@ \alias{unet_native} \title{Native UNet for Stable Diffusion} \usage{ -unet_native(in_channels = 4L, out_channels = 4L, - block_out_channels = c(320L, 640L, 1280L, 1280L), - layers_per_block = 2L, cross_attention_dim = 1024L, - attention_head_dim = 64L) +unet_native( + in_channels = 4L, + out_channels = 4L, + block_out_channels = c(320L, 640L, 1280L, 1280L), + layers_per_block = 2L, + cross_attention_dim = 1024L, + attention_head_dim = 64L +) } \arguments{ \item{in_channels}{Input channels (default 4 for latent space)} diff --git a/man/unet_sdxl_native.Rd b/man/unet_sdxl_native.Rd index 4e6668a..2f01ca8 100644 --- a/man/unet_sdxl_native.Rd +++ b/man/unet_sdxl_native.Rd @@ -3,12 +3,17 @@ \alias{unet_sdxl_native} \title{Native SDXL UNet} \usage{ -unet_sdxl_native(in_channels = 4L, out_channels = 4L, - block_out_channels = c(320L, 640L, 1280L), - layers_per_block = 2L, - transformer_layers_per_block = c(0L, 2L, 10L), - cross_attention_dim = 2048L, attention_head_dim = 64L, - addition_embed_dim = 1280L, addition_time_embed_dim = 256L) +unet_sdxl_native( + in_channels = 4L, + out_channels = 4L, + block_out_channels = c(320L, 640L, 1280L), + layers_per_block = 2L, + transformer_layers_per_block = c(0L, 2L, 10L), + cross_attention_dim = 2048L, + attention_head_dim = 64L, + addition_embed_dim = 1280L, + addition_time_embed_dim = 256L +) } \arguments{ \item{in_channels}{Input channels (default 4 for latent space)} diff --git a/man/vae_decoder_native.Rd b/man/vae_decoder_native.Rd index b11c934..2bb60c2 100644 --- a/man/vae_decoder_native.Rd +++ b/man/vae_decoder_native.Rd @@ -3,8 +3,12 @@ \alias{vae_decoder_native} \title{Native VAE Decoder} \usage{ -vae_decoder_native(latent_channels = 4, out_channels = 3, - block_channels = c(512, 512, 256, 128), norm_groups = 32) +vae_decoder_native( + latent_channels = 4, + out_channels = 3, + block_channels = c(512, 512, 256, 128), + norm_groups = 32 +) } \arguments{ \item{latent_channels}{Number of latent channels (4 for SD/SDXL, diff --git a/man/vae_decoder_native_from_safetensors.Rd b/man/vae_decoder_native_from_safetensors.Rd index c1de476..bdd768b 100644 --- a/man/vae_decoder_native_from_safetensors.Rd +++ b/man/vae_decoder_native_from_safetensors.Rd @@ -3,8 +3,12 @@ \alias{vae_decoder_native_from_safetensors} \title{Build a native VAE decoder from a diffusers safetensors directory} \usage{ -vae_decoder_native_from_safetensors(path, latent_channels = 4L, verbose = TRUE, - ...) +vae_decoder_native_from_safetensors( + path, + latent_channels = 4L, + verbose = TRUE, + ... +) } \arguments{ \item{path}{Path to the VAE directory (containing diff --git a/man/zimage_load_pipeline.Rd b/man/zimage_load_pipeline.Rd index 95391c5..17ee594 100644 --- a/man/zimage_load_pipeline.Rd +++ b/man/zimage_load_pipeline.Rd @@ -3,10 +3,16 @@ \alias{zimage_load_pipeline} \title{Load the Z-Image-Turbo pipeline} \usage{ -zimage_load_pipeline(model_dir = NULL, device = "cuda", - precision = c("auto", "fp8", "nf4", "bf16"), - text_device = NULL, attn_chunk = NULL, - phase_offload = TRUE, pin = NULL, verbose = TRUE) +zimage_load_pipeline( + model_dir = NULL, + device = "cuda", + precision = c("auto", "fp8", "nf4", "bf16"), + text_device = NULL, + attn_chunk = NULL, + phase_offload = TRUE, + pin = NULL, + verbose = TRUE +) } \arguments{ \item{model_dir}{Quantized artifact directory (default: the diff --git a/man/zimage_transformer.Rd b/man/zimage_transformer.Rd index ba6281a..7ac0cad 100644 --- a/man/zimage_transformer.Rd +++ b/man/zimage_transformer.Rd @@ -3,11 +3,20 @@ \alias{zimage_transformer} \title{Z-Image Transformer} \usage{ -zimage_transformer(in_channels = 16L, dim = 3840L, n_layers = 30L, - n_refiner_layers = 2L, n_heads = 30L, norm_eps = 1e-05, - cap_feat_dim = 2560L, rope_theta = 256, t_scale = 1000, - axes_dims = c(32L, 48L, 48L), patch_size = 2L, - f_patch_size = 1L) +zimage_transformer( + in_channels = 16L, + dim = 3840L, + n_layers = 30L, + n_refiner_layers = 2L, + n_heads = 30L, + norm_eps = 1e-05, + cap_feat_dim = 2560L, + rope_theta = 256, + t_scale = 1000, + axes_dims = c(32L, 48L, 48L), + patch_size = 2L, + f_patch_size = 1L +) } \arguments{ \item{in_channels}{Integer. Latent channels. Default 16.} diff --git a/man/zimage_unpatchify.Rd b/man/zimage_unpatchify.Rd index 9da8f85..783021d 100644 --- a/man/zimage_unpatchify.Rd +++ b/man/zimage_unpatchify.Rd @@ -3,8 +3,13 @@ \alias{zimage_unpatchify} \title{Unpatchify Z-Image tokens back to a latent image} \usage{ -zimage_unpatchify(tokens, size, patch_size = 2L, f_patch_size = 1L, - out_channels = 16L) +zimage_unpatchify( + tokens, + size, + patch_size = 2L, + f_patch_size = 1L, + out_channels = 16L +) } \arguments{ \item{tokens}{Tensor of shape [S, pF * p * p * C] with the image From 92ffbacad6b6e93efd6156302871ba624af2241a Mon Sep 17 00:00:00 2001 From: TroyHernandez Date: Tue, 11 Aug 2026 05:54:53 -0500 Subject: [PATCH 3/3] Bump version to 0.2.2.1 --- DESCRIPTION | 2 +- NEWS.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 68a6ef4..548c464 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: diffuseR Title: Functional Interface to Diffusion Models in R -Version: 0.2.2 +Version: 0.2.2.1 Authors@R: c( person("Troy", "Hernandez", email = "troy@cornball.ai", role = c("aut", "cre"), comment = c(ORCID = "0009-0005-4248-604X")), diff --git a/NEWS.md b/NEWS.md index c78e13c..e345f0c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,13 @@ +# diffuseR 0.2.2.1 + +* `txt2img()` and `img2img()` now `match.arg()` their `model_name`, so + the bare calls work (defaulting to sd21) instead of erroring on the + choices vector. +* README fixes for the CRAN-rendered page: closed the unclosed fence + that swallowed the LTX section, replaced the LTX example with the + working call shape, and pointed the example images at GitHub URLs + (the files are .Rbuildignore'd). + # diffuseR 0.2.2 * Every precision `recommend()` can return is now reachable. `bf16` was