Xlabs Sampler
How to actually get negative prompts on Flux
- model
- conditioning
- neg_conditioning
- latent_image
- controlnet_condition
- latent
Here's the thing nobody tells you when you first move from SD1.5 or SDXL to Flux: negative prompts stop working. Flux Dev and Schnell are guidance-distilled, which means the usual CFG mechanism that lets you type "blurry, extra fingers, watermark" and have the model actually avoid those things got baked out of the weights during training. A stock KSampler on Flux just... ignores your negative conditioning. XLabs Sampler is the one node in this pack built specifically to route around that, by implementing real classifier-free guidance on top of Flux rather than relying on the distilled guidance scale.
How it does it: the sampler runs steps normally at first, then at a step you specify it switches on true negative-prompt CFG for the rest of the run. That's what timestep_to_start_cfg and true_gs are for - timestep_to_start_cfg is how many steps to run before negative sampling kicks in, and true_gs is the actual CFG scale applied once it does. This is worth reading twice because it catches people: with the defaults as shipped (steps = 20, timestep_to_start_cfg = 20), CFG turns on only from step 20 of a 20-step run - which is to say, never. If your negative prompt seems to be doing nothing, that's not a bug, it's the default settings; drop timestep_to_start_cfg well below your step count (somewhere in the low single digits is a reasonable place to start) before you conclude the feature doesn't work.
The rest of the inputs: model takes your Flux diffusion model straight from a UNet loader. conditioning and neg_conditioning are your positive and negative prompts - critically, both need to be full T5 + CLIP conditioning for Flux to use its full capacity; if you feed it CLIP-only conditioning you're leaving real prompt-following ability on the table, so use a dual text encoding node rather than a plain CLIP text encode. latent_image is optional - leave it empty for text-to-image, or feed in a VAE-encoded image for img2img, in which case image_to_image_strength controls how much that source image influences the result and denoise_strength controls how much noise remains to be resolved. noise_seed and steps behave as you'd expect. The optional controlnet_condition input is where this node earns its keep alongside the rest of the pack: it only accepts conditioning produced by XLabs' own Apply Flux ControlNet / Apply Advanced Flux ControlNet nodes - a stock KSampler has no equivalent slot for it. The single output is a latent, which needs a VAE Decode downstream like any other sampler.
Should you actually use this node? Honest answer: only for one of two reasons. Either you're using XLabs' own ControlNet checkpoints and need something that accepts their controlnet_condition type, or you specifically want a working negative prompt on Flux Dev without switching to a de-distilled checkpoint like OpenFlux or LibreFlux. If neither applies, a plain KSampler with the guidance-scale node most people already use will get you there with less fuss - community sentiment on this landed exactly there: "apart from ControlNets there is no reason to use XLabs Sampler."
Where people get burned, beyond the CFG-timing trap above: several users report this sampler running dramatically slower than a stock KSampler on the same hardware - one report was 30 minutes for a single image on a 4070 Ti 12GB where a normal KSampler took about a minute. That's usually a VRAM-pressure symptom rather than a setting you're missing (falling back to system RAM tanks speed hard), so if generation crawls, check your VRAM headroom before assuming a parameter is wrong. Install is the standard pack install: search "x-flux-comfyui" in ComfyUI Manager, or git clone https://github.com/XLabs-AI/x-flux-comfyui into custom_nodes and restart - this node needs no separate model download of its own, it just needs a Flux checkpoint loaded upstream.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| conditioning | CONDITIONING | — | |
| neg_conditioning | CONDITIONING | — | |
| noise_seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–100 | — |
| timestep_to_start_cfg | INT | 200–100 | — |
| true_gs | FLOAT | 3.000–100 | — |
| image_to_image_strength | FLOAT | 0.000–1 | — |
| denoise_strength | FLOAT | 1.000–1 | — |
| latent_imageopt | LATENT | — | |
| controlnet_conditionopt | ControlNetCondition | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |