Nodes/ComfyUI-SimpleTunerFlux2/Sample (SimpleTuner Flux 2)
ComfyUI Node

Sample (SimpleTuner Flux 2)

Sampling a SimpleTuner Flux 2 pipeline — steps, CFG, and when to ignore the defaults

By flowers6421·Created 9 months ago·Updated 9 months ago· 1
Sample (SimpleTuner Flux 2)
  • pipeline
  • images
prompt
width1024
height1024
num_inference_steps28
guidance_scale3.5
seed0
num_images1
max_sequence_length512

This is where the workflow actually makes a picture. SimpleTunerFlux2Sampler ("Sample (SimpleTuner Flux 2)") takes the ST_FLUX2_PIPELINE your loader chain has been passing along, runs the denoising loop, and hands you a normal ComfyUI IMAGE tensor - the same shape anything else expects, so you wire it straight into a PreviewImage or SaveImage.

How it works

The sampler seeds a torch generator from your seed for reproducible runs, then calls the pipeline with your prompt, dimensions, step count, guidance, and sequence length. Whatever PIL images come back get converted into a (B, H, W, C) float tensor normalized to 0–1 - standard ComfyUI territory from there on.

The inputs that matter:

  • prompt - multiline. Flux 2's text encoder is a Mistral-3 language model, so it reads like prose, not tag soup. Keep it natural.
  • width / height - 256–2048, default 1024, snapped to 64px steps. Flux 2 handles higher resolutions better than Flux 1 did, but you pay for it in both VRAM and time.
  • num_inference_steps - 1–100, default 28.
  • guidance_scale - 0–20, default 3.5.
  • seed - full 64-bit range, with the usual control_after_generate to fix or vary it between runs.
  • num_images - 1–8 per run; batch 4 and pick the survivor is a legit strategy for the anatomy quirks this model family still has.
  • max_sequence_length - 64–1024, default 512. This is the Mistral-3 context you give the prompt. 512 is fine for most prompts; push toward 1024 for long, instruction-heavy ones, and expect more VRAM.

The defaults are for the base model

The shipped workflow runs 28 steps at CFG 3.5, which suits a base (undistilled) Flux 2 checkpoint. If you're sampling a distilled model - and Flux 2's Kleins are distilled - that's wrong for the model: distilled Flux 2 wants ~4 steps and CFG 1, and it's dramatically faster (Comfy Org's own launch numbers for Klein 9B distilled were ~2s on a 5090 versus ~35s for the base). There's no "distilled" toggle here; you just dial the knobs. When a sampler's output looks over-saturated or overcooked, the cause is usually CFG being left at 3.5 on a 4-step model.

Installing the pack

The pack installs once, and every node in it comes with it:

cd ComfyUI/custom_nodes
git clone --recursive https://github.com/flowers6421/ComfyUI-SimpleTunerFlux2.git
cd ComfyUI-SimpleTunerFlux2
./install.sh          # Linux/macOS
# python install.py   # Windows

or via ComfyUI Manager by searching "ComfyUI-SimpleTunerFlux2". Then restart ComfyUI.

Where people get burned

  • Everything slower than the marketing. The 4-step numbers are distilled-model, high-end-GPU territory. On a 24GB card with a base model at 1024², expect minutes per image - budget accordingly, or switch to the distilled weights.
  • Black/empty output tensors. The code returns a zero tensor if the pipeline produces no images - which usually means an upstream failure, not the sampler's fault. Check the loader chain.
  • Seed "doesn't work." If you're loading the same seed but seeing changes, you're likely not re-running the full chain; the pipeline caching in the loader means only changed branches re-execute. That's normal ComfyUI behavior, not a bug.

One sampler node, one job: it's the plain vanilla text-to-image endpoint for a pack that's otherwise all plumbing.

CategorySimpleTuner/Flux2

Inputs (9)

NameTypeDefaultDescription
pipelineST_FLUX2_PIPELINE
promptSTRING
widthINT1024256–2048
heightINT1024256–2048
num_inference_stepsINT281–100
guidance_scaleFLOAT3.50–20
seedINT00–18446744073709550000
num_imagesoptINT11–8
max_sequence_lengthoptINT51264–1024

Outputs (1)

NameTypeDescription
imagesIMAGE