flux_load_pipeline

Load the FLUX.1-schnell pipeline

Description

Loads the quantized transformer artifact plus the VAE decoder, CLIP and T5 text encoders, tokenizer, and scheduler config (from the HuggingFace cache populated by download_flux1). Components load to the CPU when phase_offload is on and move to the GPU only for their phase of the generation.

Usage

flux_load_pipeline(model_dir = NULL, device = "cuda", precision = NULL,
                   text_device = "cpu", attn_chunk = NULL,
                   phase_offload = TRUE, verbose = TRUE)

Arguments

  • model_dir: Quantized artifact directory (default: the download_flux1 location for precision), or a raw diffusers transformer directory for full-precision loading.
  • device: Character. Compute device.
  • precision: “nf4” or “fp8”; NULL picks the flux_memory_profile recommendation.
  • text_device: Device for the text encoders (“cpu” default; the T5-XXL runs float32 there).
  • attn_chunk: Integer or NULL. Attention query-chunk override.
  • phase_offload: Logical. One GPU tenant per phase.
  • verbose: Logical.

Value

A flux_pipeline list.