Nodes/ComfyUI-IcyHider/Icy LatentCrop
ComfyUI Node

Icy LatentCrop

Icy LatentCrop

By icekiub-ai·Created 9 months ago·Updated 9 months ago· 31
Icy LatentCrop
  • samples
  • LATENT
width512
height512
x0
y0

LatentCrop is one of those nodes you don't touch until you suddenly need it - and then you're glad it exists. Its job is simple: take your latent tensor and crop out a rectangle of it before you sample or decode. In a normal ComfyUI graph it's how you isolate a region of an image for a targeted img2img pass without ever touching pixels.

The "Icy" prefix here is doing exactly one thing: making this crop's preview hide until you hover over it. IcyHider is a privacy layer, not a different kind of crop. On startup its nodes.py walks ComfyUI's core node module and creates a subclass of every node class it finds, keeping the exact same inputs, outputs, and code, but moving them into the IcyHider Comfy Core category and giving them an Icy name. So IcyLatentCrop is literally core LatentCrop with a different label and a built-in cover. Everything below is about what the crop does - the hiding is just why you'd pick this one over the plain version.

The inputs that matter

From the info schema, there are exactly five, and only two will bite you:

  • samples - the LATENT you're cropping, straight out of a VAE Encode or a previous latent operation.
  • x and y - the top-left corner of the crop, defaulting to 0, 0. Step of 8.
  • width and height - the crop size, defaulting to 512, also in steps of 8, up to 16384.

The one that trips everyone up: these coordinates are in latent space, not pixels. ComfyUI's latents are 8x smaller than the image on each side, so an 8x8 latent pixel block maps to a 64x64 image region. If you want to crop a 512x512 region at image position (256, 256), you feed x: 32, y: 32, width: 64, height: 64. Get this wrong and your crop lands somewhere you weren't looking - a classic "why did it regenerate my entire face" moment.

Why you'd actually use it

The classic workflow: you generate an image, don't like one face in the corner, and want to re-roll only that area. You crop the latent to the face's region, run a low-denoise img2img pass on it, then paste the result back with a mask or a stitch. The KB's inpainting essay calls this the "only-masked detail at full resolution" trick - a 64px eye gets a full 1024px of generation budget. Doing the crop in latent space instead of pixels means no decode-encode round trip, which is one less lossy VAE cycle and slightly faster. LatentCrop is also handy for tiling experiments and for carving a single subject out of a wide composition before upscaling.

The output is a single LATENT, which feeds straight into a KSampler or a VAEDecode.

Installing it

This whole pack is frontend JavaScript plus a thin wrapper, so there are no Python dependencies and no model files to download:

# via ComfyUI Manager: search "IcyHider" and hit Install, then restart

# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/icekiub-ai/ComfyUI-IcyHider.git
# restart ComfyUI

Find it under the IcyHider Comfy Core category. If you had WAS Node Suite installed when ComfyUI started, you'll see a pile of extra wrapped nodes too - that's expected, not a bug.

Gotchas

The hiding itself is DOM-based, so on ComfyUI's new Nodes 2.0 canvas frontend the cover can silently fail to appear - one user hit exactly this on the release thread. If your previews aren't hiding, you're probably on the canvas frontend; the legacy canvas is where this pack is at home. And remember the cover is on-screen theater, not encryption: a SaveImage node downstream still writes the file to disk for anyone with folder access.

CategoryIcyHider Comfy Core

Inputs (5)

NameTypeDefaultDescription
samplesLATENT
widthINT51264–16384
heightINT51264–16384
xINT00–16384
yINT00–16384

Outputs (1)

NameTypeDescription
LATENTLATENT