LucidFlux Sampler
CFG Stays at 1, and Why the Sigma Table Cares About Your Resolution
- model
- positive
- latent
- noise
- LATENT
You might reasonably wonder why a pack would ship its own sampler when ComfyUI has a perfectly good KSampler. The answer isn't gatekeeping: LucidFlux's official pipeline builds its noise schedule from a resolution-dependent formula that stock KSampler can't express, and the pack reproduces it exactly while delegating the actual denoising to ComfyUI's native Euler.
LucidFlux Sampler is therefore a thin, opinionated node. It computes a sigma table, calls ComfyUI's Euler sampler, returns a latent.
The sigma thing, without the maths
Flux-family models use a "shift" that warps the timestep schedule, and the amount of shift depends on how many image tokens you have - i.e. on your resolution. Upstream's get_schedule interpolates a shift magnitude from the sequence length (256 → 0.5, 4096 → 1.15) and warps the linear timestep ramp through it.
The pack rebuilds that table from your latent's height and width, which is why this node reads the latent shape rather than taking a sampler/scheduler pair like a normal KSampler. The shift boolean - default on - is your off switch for the whole warp. Turning it off gives you a straight linear ramp, which is not what upstream does, so treat it as a debugging tool rather than a creative choice.
Practical upshot: your results at 32² latent and 128² latent won't just differ in size, they'll differ because the schedule differed. Some people find the low-res path needs a step or two more.
The settings
steps defaults to 28, which is the honest non-distilled number. The shipped example workflow runs 8 - because it loads flux-turbo LoRA at 1.0 through a LoraLoaderModelOnly first. That's the pattern: with the turbo LoRA and Turbo-Alpha weights from alimama-creative, eight steps is right; without it, land somewhere in the twenties. If you're getting mush, count your steps before you touch anything else.
cfg defaults to 1.0 and there's a reason. There is no negative input on this node - the underlying call passes an empty negative list - and Flux-dev is guidance-distilled, so the guidance you'd normally express as CFG is already baked into the weights and, for this model specifically, injected via LucidFlux Condition's guidance value. Cranking CFG here does not give you prompt adherence; it gives you a double-correction and a burnt image at twice the compute. This is the same inversion the concepts notes describe for every guidance-distilled model since 2024, and it catches people who've only used SDXL.
seed behaves as you'd expect, including with batch sizes above one. model takes your UNETLoader output - any Flux dev (fp8 or bf16) works, including KJ's or the official ComfyUI packaging.
Optional noise: a LATENT input for supplying your own noise instead of the sampler generating it from the seed. The author's own description says it's there for bit-exact comparison against the official script. You will not need it, and wiring noise in from somewhere random is a great way to make your seeds meaningless.
Output is a single LATENT with the raw samples in it. That goes either into VAEDecode (with the F16 patch in front of it) or into LucidFluxPiDDecode for the 4× path.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_LucidFlux
# restart ComfyUI, then find it under the LucidFlux category
No extra dependencies beyond torch and einops, and no model files of its own - it inherits Flux dev from your UNETLoader. The pack as a whole needs a fair bit downloaded (see the README's model tree), which is the usual reason a fresh install looks broken on the missing-nodes treadmill.
What goes wrong
Garbled, high-contrast garbage. Nine times out of ten this is a conditioning problem, not a sampler one - the CONDITIONING in positive didn't come from LucidFlux Condition, or the control branch wasn't attached because the lq/ldr images were mis-sized. The sampler only knows what it's told.
It runs but the image is soft. Check steps against whether you actually loaded the turbo LoRA. Eight steps without it is undercooked; twenty-eight steps with it is waste.
You want CFG 3.5 like your Flux workflows. Two things differed. Your other Flux graph fed guidance through a FluxGuidance node into the conditioning and left KSampler at CFG 1. Here, guidance lives on the condition node and the sampler has no negative to extrapolate from. Set guidance there.
Changing resolution changes the look. Not a bug. Different latent size, different sequence length, different schedule. If you want to compare seeds fairly, keep the latent size fixed and change one thing at a time.
One last thing worth saying out loud: the whole pack is early, unpolished software by a solo author, with a Chinese-first README and one public thread on Reddit that's a person failing to run the examples. It works - but budget an evening for setup, not ten minutes.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| latent | LATENT | — | |
| steps | INT | 281–200 | — |
| seed | INT | 00–18446744073709550000 | — |
| cfg | FLOAT | 1.000–100 | — |
| shift | BOOLEAN | true | — |
| noiseopt | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |