Kohya Deep Shrink (bleh)
Generate past your model's native resolution
- model
- MODEL
If you've ever asked SDXL for a 2048px image and gotten duplicated torsos or a second, smaller face floating in the background, you've met the "generating above native resolution" problem. The usual fix is a two-pass hires-fix workflow: generate small, upscale, run a second lower-denoise pass. Deep Shrink is the cheaper trick - one model, one sampler, no second pass - and this node is the better version of it.
It's not a bleh original. This is Kohya's "Deep Shrink" technique, also known in ComfyUI core as PatchModelAddDownScale. The idea: shrink the latent at one of the model's early blocks for the opening chunk of sampling, then let it scale back up. Composition and big anatomical decisions get made early in the denoising process, so if the model is effectively working on a smaller image during that window, it doesn't have room to duplicate a second head. Once the effect ends, sampling continues at full resolution to fill in detail.
Bleh's version adds three things the stock node doesn't have. First, commasep_block_numbers takes a comma-separated list instead of one block - try 2,3 or 1,2,3 if you want to experiment, though the README is upfront that effects on multiple blocks stack: downscaling three blocks by 2x each behaves more like a much bigger downscale on whatever's downstream, so back off downscale_factor as you add blocks. Second, start_fadeout_percent lets the downscale amount taper off gradually instead of snapping back to full size at end_percent - useful for avoiding a visible seam where the effect ends. Third, it opens up the scaling algorithm choices well beyond bicubic, including antialiasing toggles for bicubic and bilinear.
The inputs you'll actually touch: model, commasep_block_numbers (default "3", a safe single-block default for SD 1.5 and SDXL), downscale_factor (2.0 default - how hard the block gets shrunk), start_percent/end_percent (0 to 0.35 by default - Deep Shrink is meant to run only during the early, composition-deciding part of sampling, not the whole thing), and start_fadeout_percent if you want the gradual taper instead of a hard cutoff. downscale_method/upscale_method default to bicubic, which is the safe choice among the roughly 530 scaling modes bleh exposes if you want to go digging. Output is a patched MODEL - wire it straight into your sampler chain like any other model patch node.
One thing worth knowing before you tune the fadeout: the README specifically calls out that scheduler choice matters here. Schedulers that move at a steady, linear pace - ddim_uniform, sgm_uniform, and to a lesser extent normal - fade the effect out cleanly. Karras and exponential schedulers rush through the low-timestep region and "may produce complete nonsense" when combined with a fadeout, in the author's own words. If your fadeout looks broken, check the scheduler before you start tweaking percentages.
Install is the standard route for this pack: through ComfyUI Manager (search "ComfyUI-bleh"), or manually with cd ComfyUI/custom_nodes && git clone https://github.com/blepping/ComfyUI-bleh and a restart. No extra model downloads or Python dependencies for this specific node.
For what it's worth, Deep Shrink isn't some forgotten corner technique - it still comes up regularly in the same conversations as hires fix, for exactly the same reason: getting SDXL or SD 1.5 output bigger than their trained resolution without the anatomy falling apart. If you're hitting duplicated limbs or tiling artifacts at high res and don't want to add a whole second sampling pass to your graph, this is the node to reach for before Deep Shrink's more general (and much less documented) sibling, BlehBlockOps.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Model to patch | |
| commasep_block_numbers | STRING | 3 | A comma separated list of input block numbers, the default should work for SD 1.5 and SDXL. |
| downscale_factor | FLOAT | 2.01–32 | Controls how much the block will get downscaled while the effect is active. |
| start_percent | FLOAT | 0.0000–1 | Start time as sampling percentage (not percentage of steps). Percentages are inclusive. |
| start_fadeout_percent | FLOAT | 1.0000–1 | When enabled, the downscale_factor will fade out such that at end_percent it will be around 1.0 (no downscaling). May reduce artifacts... or cause them! |
| end_percent | FLOAT | 0.3500–1 | End time as sampling percentage (not percentage of steps). Percentages are inclusive. |
| downscale_after_skip | BOOLEAN | true | Controls whether the downscale effect occurs after the skip conection. Generally should be left enabled. |
| downscale_method | COMBO | bicubic | Mode used for downscaling. Bicubic is generally a safe choice. |
| upscale_method | COMBO | bicubic | Mode used for upscaling. Bicubic is generally a safe choice. |
| antialias_downscale | BOOLEAN | false | Experimental option to anti-alias (smooth) the latent after downscaling. |
| antialias_upscale | BOOLEAN | false | Experimental option to anti-alias (smooth) the latent after upscaling. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |