Nodes/Power Noise Suite for ComfyUI/Latents to CPU 🦚
ComfyUI Node

Latents to CPU 🦚

Latents to CPU

By WASasquatchΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 81
Latents to CPU 🦚
  • latents
  • latents

Latents to CPU does exactly one thing: it moves a latent tensor off the GPU and onto system RAM. That's the whole node - one LATENT in, one LATENT out, no settings. Sounds trivial until you're running a big Power Noise Suite workflow on an 8 GB card and ComfyUI starts gasping for VRAM mid-graph. This is the node you slot in to stop the bleeding.

Where it earns its keep is right after the noise generators in this pack. Nodes like Power-Law Noise or Perlin Power Fractal can stamp out noise latents at any size up to 8192px, and if you chain several of them - say, generating a few noise variants to blend later - they'll sit on the GPU eating memory for the whole queue. Pass them through Latents to CPU and they drop into RAM, where a latent is just a few hundred MB of float tensor nobody needs to compute on. ComfyUI pulls samples back to whatever device the sampler wants when they're actually used, so you don't lose anything by offloading early.

Under the hood it's embarrassingly simple: it takes the samples tensor out of the latent dict and calls .to(device="cpu") on it. Nothing else. No resizing, no encoding, no copy of the noise mask. If you were hoping for a secret button here, there isn't one.

When to actually use it

  • You generate a batch of noise latents up front and only sample from them later - offload them so VRAM is free for the denoise step.
  • You're blending several latents into one. Blend each source through this node first, do the math on CPU, and only the result needs GPU time.
  • You hit CUDA out of memory on a noise-heavy graph and want the cheap fix before you start shopping for a bigger card.

Honest caveat: for a single 512×512 latent on a healthy card, this node is a no-op that costs you nothing. Its value is purely about when and where your tensors live. That's also the trap - if you offload something a sampler is about to read every single step, you pay for a CPU→GPU round trip each step, and that can slow things down. Offload the stuff that's waiting, not the stuff in the hot path.

Install

This ships in Power Noise Suite, so install the pack once and you get all of its nodes together. Easiest is ComfyUI Manager: search for "Power Noise Suite" and hit install. Or, by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/PowerNoiseSuite

Restart ComfyUI. No model files to download, and the only dependency is torch, which you already have - the pack's requirements file lists nothing but torch.

Troubleshooting

There's not much that can break here. If you see a red error about the device, it usually means something else in your graph is feeding this node a malformed latent - check that whatever precedes it actually outputs LATENT. And a note from the pack itself: every Power Noise Suite node announces itself at startup with a peacock 🦚 noise in the console. If you see that line, the pack loaded fine and any trouble is downstream.

CategoryPower Noise Suite/Latent/Util

Inputs (1)

NameTypeDefaultDescription
latentsLATENTβ€”

Outputs (1)

NameTypeDescription
latentsLATENTβ€”