KSampler Batch (CRT)
Batch sampling that stops re-encoding your prompts every image
- model
- vae
- positive
- negative
- latent_image
- image
- images
- comparison_grid
- latents
This is the node that made CRT-Nodes worth installing. KSampler Batch (CRT) is the pack's flagship sampler, and it exists to solve the dumbest bottleneck in local batch rendering: when you run N variations, a normal KSampler reloads and re-encodes everything for every single image. This node encodes your conditioning once, then renders the whole batch in a single pass - the author's own numbers say more than 2x inference throughput, and the community post showing it ("Render Z Image faster with batch compute") was one of the pack's big moments.
It's built for the Z-Image Turbo / Flux-style distilled models that dominate 2026 batch work (see the KB's photorealism notes - Z-Image Turbo is the local batch default), but it'll sample any model you give it.
How it works
You feed it model, vae, and positive (plus optional negative), and a batch of work to do. The batch can come from two places: connect an image batch (each image gets VAE-encoded and becomes its own starting latent, or its own reference latent) or a latent_image batch, or let it auto-generate an empty latent from the VAE's channel info. Then it samples every item.
The two modes matter:
- Batch (Parallel) - all items sampled in one batched pass. Fastest, and the whole point of the node.
- Sequential - items one after another. Slower, but gentler on VRAM and easier to reason about.
increment_seed is the default and it's great: with it on, item 1 gets your seed, item 2 gets seed+1, and so on, so every variation is reproducible but distinct. Turn it off and every item shares the seed - which is the recipe for N identical images, so be deliberate about it.
Other inputs worth knowing: image_megapixels resizes incoming images to a target resolution before encoding (quantized to VAE boundaries - LTX video VAEs get handled specially so a batch isn't mistaken for video frames). enable_vae_decode toggles whether latents come back as images. create_comparison_grid builds a side-by-side grid of the whole batch, which is the fastest way to eyeball a variation sweep.
There's a neat special mode too: edit_model_flux2klein. For Flux Klein edit/fill models, it sets up ReferenceLatent-style conditioning - each image (or just image[0] in "shared" mode) becomes the reference latent and sampling starts from an empty latent, which is how you do batch image-editing on Klein. That one forces denoise=1.
Outputs and saving
Three outputs: images (the rendered batch), comparison_grid, and latents. It can also save to disk itself - save_images, plus save_folder_path / save_subfolder_name / save_filename_prefix control where (.\ComfyUI\output + subfolder by default) and it embeds the prompt and workflow as PNG metadata, which is a genuinely nice touch for later.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes.git
pip install -r requirements.txt
or ComfyUI Manager → search "CRT-Nodes", restart.
The traps
Two things bite people. First, the default save path is a Windows-style .\ComfyUI\output - on Linux or a different install, point save_folder_path at your real output folder or the "saved" messages will go somewhere you don't expect (it does create the folder, so it won't fail silently, it'll just be in the wrong place). Second, if you connect both image and latent_image, image wins - that's by design but easy to forget mid-debug. And if increment_seed is off, re-running with a changed seed but same images is how you accidentally burn a batch producing duplicates.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| vae | VAE | — | |
| positive | CONDITIONING | — | |
| seed | INT | 00–18446744073709550000 | — |
| increment_seed | BOOLEAN | true | If enabled, each batch item gets seed+1, seed+2, etc. If disabled, all items use the same seed. |
| steps | INT | 81–10000 | — |
| cfg | FLOAT | 1.00–100 | — |
| 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 | |
| denoise | FLOAT | 1.000–1 | — |
| mode | COMBO | Batch (Parallel) | 2 options: Batch (Parallel), Sequential |
| image_megapixels | FLOAT | 1.000.1–16 | Target resolution in megapixels. Images are resized (lanczos) preserving aspect ratio and quantized to VAE boundaries before encoding. |
| edit_model_flux2klein | BOOLEAN | false | Enable ReferenceLatent-style conditioning for edit/fill models (flux2klein). Forces denoise=1 and samples from an empty latent. Requires image input. |
| reference_mode | COMBO | per_item | per_item: each image in the batch is used as its own reference latent. shared: image[0] is used as the reference for every batch item. |
| enable_vae_decode | BOOLEAN | true | Decode latents to images using the VAE. |
| create_comparison_grid | BOOLEAN | true | Create a horizontal side-by-side comparison grid of all batch outputs. |
| save_images | BOOLEAN | true | Save output images to disk. |
| save_folder_path | STRING | .\ComfyUI\output | Root folder where outputs will be saved. |
| save_subfolder_name | STRING | KSAMPLER_BATCH | Subfolder inside the root folder for organizing outputs. |
| save_filename_prefix | STRING | output | Prefix for output filenames. Seed is appended automatically. |
| negativeopt | CONDITIONING | — | |
| latent_imageopt | LATENT | Starting latent. If image is also connected, image takes priority. If neither input is connected, a dummy empty latent is auto-generated using VAE channel info. | |
| imageopt | IMAGE | Input image batch. Resized to image_megapixels before encoding. In normal mode: VAE-encoded as the starting latent. In edit_model_flux2klein mode: used as reference latent; sampling starts from an empty latent. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| comparison_grid | IMAGE | — |
| latents | LATENT | — |