LongCat Sampler
The node that runs LongCat — and quietly ignores half its own dropdowns
- model
- positive
- negative
- latent_image
- latent
This is the payoff node. LongCatSampler is where the denoising actually happens - it takes the MODEL from LoadLongCatModel, the CONDITIONING from either text-encode node, and a LATENT (usually from LongCatSizePicker), and runs LongCat's flow-matching loop in Python instead of going through ComfyUI's normal sampler plumbing.
It looks like a KSampler at first glance, and that's where the gotcha lives. The sampler_name (44 choices) and scheduler (9 choices) dropdowns are accepted and then… not really used. The loop always steps with the LongCat FlowMatchEulerDiscreteScheduler that was attached to the model at load time. So don't burn an hour hunting for the "right" sampler - it's decorative in this version. The two knobs that matter are steps and cfg:
- steps - default 50. If you're using the LongCat Edit-Turbo checkpoint, that's an 8-step distilled model; drop it way down.
- cfg - default 4.5. Flow-matching models want low CFG; cranking it will oversaturate.
There are two LongCat-specific safety inputs: cfg_norm (default on) renormalizes the CFG result to match the conditional prediction's norm, which is the standard fix for that oversaturation; cfg_renorm_min (default 0) sets a floor on the scaling so it can't clamp to nothing. Leave both alone until you have a reason not to.
The remaining inputs are familiar: seed, control_after_generate (fixed / increment / decrement / random), and the three graph sockets. One warning hidden in there - the sampler looks at your conditioning for reference images and a vae, and if it finds images but you fed it a plain ComfyUI VAE instead of the one from LongCatVAELoader, it raises a ValueError telling you exactly that. LongCat's latents are 16-channel, Flux-style, so a stock 4-channel VAE was never going to work anyway. The wrapper from LongCatVAELoader carries the latent-channel count and scale factor the sampler needs.
Mechanically, this is where the interesting stuff lives: it packs the latent into patch tokens, builds positional ids for text and image, does the CFG with renorm, and steps the scheduler. In the text-to-image path it outputs a LATENT - and here's the honest caveat: this pack doesn't ship a VAE-decode node yet, so right now the graph ends at a latent unless you add your own decode. The README's roadmap lists a decode node as planned. It's a young plugin - one commit - so treat it as a promising work in progress, not a finished product.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 501–1000 | — |
| cfg | FLOAT | 4.50–20 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| cfg_norm | BOOLEAN | true | — |
| cfg_renorm_min | FLOAT | 0.000–1 | — |
| control_after_generate | COMBO | fixed | 4 options: fixed, increment, decrement, random |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |