Nodes/RES4LYF/Latent Channels From To
ComfyUI Node Runs on cloud

Latent Channels From To

Copy channel data between two latents

By ClownsharkBatwing·Created 2 years ago·Updated 22 days ago· 1,222
Latent Channels From To
  • latent_to
  • latent_from
  • latent

This is latent surgery, and it's about as low-level as RES4LYF's latent tools get. Latent Channels From To takes channel data out of one latent and writes it into another. Latents aren't just "a compressed image" - they're multi-channel tensors, and each channel carries different information. This node lets you transplant channels from a source latent onto a target one.

It's a power-user building block for the pack's guide and unsampling experiments - the sort of thing you use when you want to keep the structure of one latent but borrow specific channel content from another, or when you're hand-assembling a guide. If that sentence didn't land, this node isn't one you need yet, and that's fine.

How it works

It reads two latents - a latent_from (the source) and a latent_to (the destination) - and produces a new latent where channel data from the source has been carried onto the target. The target's shape is the frame the result sits in; the source supplies channel values. Because it's operating directly on the tensor, both latents need to be shape-compatible for the copy to make sense.

The inputs and outputs that matter

  • latent_to (LATENT) - the destination. This is the latent you're modifying; think of it as the base.
  • latent_from (LATENT) - the source, whose channel data gets copied over.
  • latent (LATENT, output) - the result, into your sampler or the next latent node.

The names are the whole API: channels go from latent_from to latent_to.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt

Portable ComfyUI: use the embedded pip. Restart, hard-refresh F5. No downloads.

Common issues & troubleshooting

Shape mismatch. Both latents need compatible dimensions for a channel copy to work. Latents from different resolutions or different model families won't line up. Match them first (same size, same VAE/latent format).

The result looks scrambled. Latent channels don't map to human-readable things like "red" or "brightness" - they're learned features. Transplanting them can produce unpredictable results by design. This is an experimental tool; expect to iterate and preview rather than dial in a clean setting on the first try.

Which is which? latent_from is the donor, latent_to is the recipient. If the effect is backwards from what you wanted, swap them.

Do I actually need this? For normal txt2img or even most img2img, no. This lives in the deep end of RES4LYF's latent-manipulation toolkit, for people composing guides or dissecting latents. If you're not already doing channel-level work, skip it - the pack's guide nodes get you most of the "borrow content from another image" behavior with far less fuss.

CategoryRES4LYF/latents

Inputs (2)

NameTypeDefaultDescription
latent_toLATENT
latent_fromLATENT

Outputs (1)

NameTypeDescription
latentLATENT