Nodes/ComfyUI-STARFlow/STARFlow Sampler
ComfyUI Node

STARFlow Sampler

STARFlow's sampler isn't a KSampler — meet the reverse flow

By RyukoMatoiFan·Created 8 months ago·Updated 2 months ago· 0
STARFlow Sampler
  • model
  • conditioning
  • vae
  • input_image
  • samples
seed0
cfg2.5
jacobifalse
jacobi_th0.0010
jacobi_block_size16
jacobi_max_iter32
attn_temp1.0
guide_top-1
annealed_guidancefalse
return_sequencefalse
denoising_batch_size1
disable_learnable_denoiserfalse
target_noise_std-1.00
context_length16

If you came here from a normal SD workflow, the first thing you'll notice is what's missing: no steps, no scheduler, no denoise. STARFlow is a normalizing flow model, not a diffusion model, so it doesn't traverse a noise schedule with a sampler name from the KSampler dropdown. It runs a reverse flow - it pushes pure Gaussian noise back through the model to reconstruct a clean latent, and it does that in a number of passes decided by the architecture, not by a step count you pick.

That's the genuinely interesting part of Apple's release, and honestly the reason most people bother. The output quality at launch was mid by 2025 standards - the community said so, repeatedly - but the mechanism is unlike anything else in ComfyUI. This node is where that mechanism lives.

What it does

STARFlowSampler takes the STARFLOW_MODEL from the checkpoint loader, the STARFLOW_CONDITIONING from the T5 text encoder, and a VAE (used only to figure out latent geometry). It reads the aspect ratio out of your conditioning, computes the latent size, seeds RNG, and runs the model's reverse pass. Under the hood it can use Jacobi iteration - a fixed-point solver that converges on the solution in fewer forward passes than a straight sequential decode - which is STARFlow's big speed trick. Jacobi is off by default for images (jacobi: false), with a warning-worthy threshold clamp if you push jacobi_th past 0.1.

The inputs that matter

Only a few, for a first run:

  • seed and cfg - the usual. Default cfg is 2.5; the shipped example workflow runs 3.6. Flow models cook fast past that, so keep it in the low single digits. cfg is also your toggle for image conditioning: input_image requires cfg > 0, or the node refuses.
  • jacobi, jacobi_th, jacobi_block_size, jacobi_max_iter - the fast path. 16 block size and 0.001 threshold are the recommended image values per the tooltips. Flip jacobi on if you want speed; leave it off if you want the plain flow.
  • attn_temp, annealed_guidance, guide_top - non-Jacobi tuning knobs. Defaults are fine until you're chasing artifacts.
  • input_image - optional IMAGE conditioning (STARFlow supports image-guided generation too). The node encodes it with the VAE and builds KV caches from it.

The rest - target_noise_std, denoising_batch_size, disable_learnable_denoiser, return_sequence, context_length - are for reproducing Apple's exact reference behavior or debugging. The shipped values match the official inference profile; leave them alone until you have a reason.

Output is a LATENT that feeds STARFlowVAEDecode. If you enable return_sequence, you also get a debug artifact, but the node is loud either way - it prints sampling progress to the console, which you'll quickly learn to read or ignore.

Wiring it up

STARFlowCheckpointLoader ──model──▶ STARFlowSampler ──samples──▶ STARFlowVAEDecode ──▶ SaveImage
STARFlowT5TextEncode ──conditioning──▶ STARFlowSampler
VAELoader (sd-vae-ft-ema) ──vae──▶ STARFlowSampler

Gotchas

The model is 3B and this node holds the whole transformer in VRAM, so on 8 GB cards it's tight. The sampler caches the text encoder inside the conditioning object, which speeds up repeated runs but means the first one is slow. And if you came from a distilled-model habit of setting CFG near 1 - don't. STARFlow isn't guidance-distilled; it expects a real CFG value, which is why the default is 2.5 rather than 1.

CategorySTARFlow

Inputs (18)

NameTypeDefaultDescription
modelSTARFLOW_MODELSTARFlow model
conditioningSTARFLOW_CONDITIONINGText conditioning from T5 encoder
vaeVAEVAE for determining latent dimensions
seedINT00–18446744073709550000Random seed for reproducible generation
cfgFLOAT2.50–10Classifier-free guidance scale
input_imageoptIMAGEOptional image for conditioning (uses VAE encode)
jacobioptBOOLEANfalseEnable Jacobi iteration for faster sampling
jacobi_thoptFLOAT0.00100–100Jacobi convergence threshold (0.001 recommended for images)
jacobi_block_sizeoptINT161–128Jacobi block size (16 recommended for images)
jacobi_max_iteroptINT321–100Maximum Jacobi iterations
attn_tempoptFLOAT1.0-1–10Attention temperature (for non-Jacobi mode)
guide_topoptINT-1-1–1024Guide top blocks only (-1 disables)
annealed_guidanceoptBOOLEANfalseAnneal guidance during sampling
return_sequenceoptBOOLEANfalseReturn the full reverse sequence (debug)
denoising_batch_sizeoptINT10–128Denoising batch size (official behavior)
disable_learnable_denoiseroptBOOLEANfalseDisable learnable denoiser if present
target_noise_stdoptFLOAT-1.00-1000–1000Override noise_std when >= 0
context_lengthoptINT160–1024Context length for video Jacobi sampling

Outputs (1)

NameTypeDescription
samplesLATENT