Skip DiT Blocks KJ(SkipDiTBlocksKJ)
Skip DiT Blocks KJ patches a diffusion model so that selected transformer (DiT) blocks are skipped entirely: their compute is never run.
Skip Di T Blocks KJ
Description
Skip DiT Blocks KJ patches a diffusion model so that selected transformer (DiT) blocks are skipped entirely: their compute is never run. This is a blunt instrument for cutting sampling cost or for experimenting with how individual blocks contribute to the final image: skipping a block is not the same as zeroing its output, the block is bypassed completely.
The node works by installing ComfyUI's DiT block replace patches, so it only has an effect on models that support them, for example Flux, Chroma, Wan, LTX, Qwen-Image, HunyuanVideo, SD3 and Kandinsky5. Models without that support (such as Lumina/Z-Image, Flux3, Krea2 and HiDream) are left unchanged, and a warning is logged so you know the patch did nothing. Skipping applies to both the conditional and unconditional passes.
Inputs
model
The MODEL to patch. The returned model carries the skip behavior; the original model is not modified in place, so you can branch different skip configurations from the same loaded model.
double_blocks
A STRING listing the block indices to skip in the double-stream stack, comma separated, with ranges allowed, for example 10, 12, 20-25. Default is an empty string, which skips nothing.
For single-stack models such as Wan, LTX and Qwen-Image this is the main block list to use.
single_blocks
A STRING listing the block indices to skip in the single-stream stack, using the same comma/range syntax. Default is an empty string, which skips nothing.
Use this for the single-stream blocks of Flux, Chroma and HunyuanVideo. It is also the main block list for Qwen-Image 2.1, MOSS-Image and FIBO 2.
start_percent
FLOAT, default 0, range 0–1, step 0.01. The step-based sampling progress at which skipping begins. At the default of 0 the skip window is active from the very first step.
end_percent
FLOAT, default 1, range 0–1, step 0.01. The step-based sampling progress at which skipping ends. At the default of 1 the skip window stays active through the final step.
Together, start_percent and end_percent define a window within the sampling schedule, measured in step progress rather than in sigma, during which the listed blocks are bypassed. Outside that window the model runs normally.
Outputs
model output
The patched MODEL, ready to be connected to a sampler or to further model patches. Because the wiring is a model patch, it composes with other model-side nodes in the usual way.
Usage Notes
- Block indices are zero-based positions in the model's block list. Use ranges (
20-25) for contiguous runs rather than typing every index. - Leave a list empty to skip nothing in that stack. On a model with only one stack, filling in the wrong list has no effect: put the indices in the list that matches the architecture (see the notes on
double_blocksandsingle_blocksabove). - Restricting the window with
start_percent/end_percentis often more forgiving than skipping across the whole schedule. Skipping only early or only late steps tends to preserve more structure than skipping throughout. - The node is filed under
KJNodes/experimental. Skipping blocks changes the model's behavior significantly and results will degrade as more blocks are skipped; start with a small number of indices and increase gradually. - If your model is one of the unsupported architectures, the node still runs and returns a model, but nothing is skipped. Check the console for the warning before assuming an effect.
- Because the patch is applied to both cond and uncond, the same blocks are skipped in the negative pass as well.
Comments
Sign in with GitHub to join the discussion.