EmptyLatentImageCustom
Empty latents for Cascade, 16-channel, and odd shapes
- LATENT
Stock ComfyUI's EmptyLatentImage makes one shape of empty canvas: a 4-channel SD-style latent at width/8. That's fine until you're working with a model that expects something else - Stable Cascade with its unusual compression, or a modern 16-channel latent space, or a case where you need to set the exact tensor precision. EmptyLatentImageCustom is the version that lets you pick all of that.
It's a workflow-plumbing node, and RES4LYF ships it because the pack spans a lot of model families that don't share a latent format. Where the stock node hides the channel count and compression from you, this one exposes them: number of channels, the compression ratio, a mode preset for specific architectures, and the numeric precision of the tensor. That's the difference between "make me a blank SD latent" and "make me exactly the blank latent this model wants to start from." If you're on plain SD/SDXL/Flux, you don't need this - but the moment you're feeding Cascade or a 16-channel model and the stock node's output is the wrong shape, this is the fix.
How it works
Same idea as any empty-latent source - it allocates a zero-filled latent tensor - but you dictate the shape. Pick channels, mode, compression and precision, set the size, and it hands you a LATENT to sample from.
The inputs and outputs that matter
LATENTout - the empty canvas, into your sampler.channels(4or16) - 4 for classic SD-style latents, 16 for the newer high-channel latent spaces. Match your model or the sampler will complain about a shape mismatch.mode(sdxl/cascade_b/cascade_c/exact) - an architecture preset that sets up the right latent geometry.cascade_b/cascade_care for Stable Cascade's two stages;exacttakes your width/height literally.compression(default 42) - the spatial compression ratio, which is where Cascade differs sharply from SD (Cascade's compression is famously high). Leave it alone unless the model calls for a specific value.width/height- the size. Note the defaults are tiny (24) because in some of these modes the numbers are in compressed/latent units, not pixels - set them to what your chosen mode expects.precision(fp16/fp32/fp64) - the tensor dtype.fp32is the safe default.
How to install it
ComfyUI Manager: search RES4LYF, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt
then restart and hard-refresh (F5). Nothing to download.
Common issues & troubleshooting
"Expected N channels" errors from the sampler. You picked the wrong channels. SD/SDXL want 4; the newer 16-channel models want 16. This is the single most common mismatch - set it to what the checkpoint uses.
The image comes out a weird size. The width/height numbers mean different things per mode - in exact they're literal, in the Cascade modes they interact with compression. If the output resolution surprises you, switch to exact and set the dimensions you actually want, or match the width/height convention your Cascade workflow uses.
Do I even need this? If you're on ordinary SD, SDXL or Flux, no - the stock EmptyLatentImage is simpler and correct. Reach for this only when a model needs a channel count, compression or precision the stock node won't give you.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 241–16384 | — |
| height | INT | 241–16384 | — |
| batch_size | INT | 11–4096 | — |
| channels | COMBO | 4 | 2 options: 4, 16 |
| mode | COMBO | default | 4 options: sdxl, cascade_b, cascade_c, exact |
| compression | INT | 424–128 | — |
| precision | COMBO | fp32 | 3 options: fp16, fp32, fp64 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |