🔶 KSampler +VAEdecode +Latent
The flexible one that hands back the latent too
- model
- positive
- negative
- vae
- latent_Override
- latent_by_Image_Override
- IMAGE
- SAMPLES
Of the three "plain" Chaosaiart KSamplers, this is the one that doesn't force you to pick txt2img or img2img up front - it can act as either, or continue from a latent you already have, depending on what you plug into its optional inputs. And unlike the other two, it gives you the raw LATENT back alongside the decoded image, so you can chain it into another sampling pass or an upscaler without a wasted decode/re-encode round trip.
What it does
By default, with nothing plugged into the optional inputs, this behaves like the txt2img node: it builds a blank latent internally from Image_Mode (Widescreen/Portrait/Square), Image_Size (360p/480p/HD/Full HD), and Img2img_input_Size (resize/crop/override - same three-way fit choice as the img2img KSampler). Plug an image into the optional latent_by_Image_Override and it switches to img2img behavior, encoding that image as the starting latent instead. Plug a latent directly into the optional latent_Override and it skips generation-from-scratch entirely, sampling forward from whatever latent you hand it - the move you'd want when chaining off a previous KSampler pass rather than starting fresh from an image or from noise.
denoise (default 1, 0–1 range) works as usual, and there's an optional denoise_Override (FLOAT) for feeding it in dynamically instead of setting a fixed widget - same pattern as the img2img KSampler, useful if a counter node elsewhere in your graph is meant to be driving denoise strength over a sequence rather than you setting it once. The rest is the familiar list: model, positive/negative, vae, seed, steps (default 20), cfg (default 8), sampler_name (34 choices), scheduler (9 choices).
Two outputs: IMAGE (decoded) and SAMPLES (the raw LATENT). That second output is the whole reason to pick this node over the plainer txt2img or img2img KSamplers - if your workflow needs to keep working in latent space (a second refinement pass, a latent upscale, feeding into another sampler) this is the one built for it.
Why you'd reach for it
Pick this over KSampler1/KSampler2 whenever you either need the latent downstream, or you want one node that can flex between "start from nothing," "start from an image," and "continue from a latent" depending on what's wired in that pass. It's the closest thing in the pack to a stock KSampler with the encode/decode built in rather than stripped out.
Installing it
Through ComfyUI Manager, search "Chaosaiart-Nodes" or use "Install via Git URL" with https://github.com/chaosaiart/Chaosaiart-Nodes, then restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/chaosaiart/Chaosaiart-Nodes, restart ComfyUI. On Linux, pip install opencv-python and pip install tqdm (venv active first) - needed for the pack to load cleanly even though this specific node doesn't touch either library. Windows has a bundled Install_windows script. No models ship with it.
Troubleshooting
If the node seems to be ignoring your image and generating from scratch, check that you actually wired something into latent_by_Image_Override or latent_Override - leave both empty and it defaults to blank-latent txt2img behavior regardless of what you expected. If you've fed it both a latent and an image override at once, don't rely on guessing which wins; wire only the one you mean to use for that run. And the same CFG caution as the other two Chaosaiart KSamplers applies: cfg=8 is tuned for SD 1.5/SDXL-class checkpoints, and will burn out output on a distilled or guidance-baked model - drop it toward 1 for those.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| Image_Mode | COMBO | 3 options: Widht = Height, Widescreen / 16:9, Portrait (Smartphone) / 9:16 | |
| Image_Size | COMBO | 4 options: 360p, 480p, HD, Full HD | |
| Img2img_input_Size | COMBO | 3 options: resize, crop, override | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28 | |
| scheduler | COMBO | 9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| denoise | FLOAT | 1.000–1 | — |
| denoise_Overrideopt | FLOAT | — | |
| latent_Overrideopt | LATENT | — | |
| latent_by_Image_Overrideopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| SAMPLES | LATENT | — |