Nodes/ComfyUI_StarNodes/⭐ Star Image2Latent
ComfyUI Node

⭐ Star Image2Latent

Image in, latent out, with a noise dial

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Image2Latent
  • image
  • vae
  • latent
noise_amount0.00
latent_type

ComfyUI's stock VAE Encode gets you most of the way to img2img, but it leaves the "how much do I change this" part to you - you end up bolting a noise node onto the latent, or crossing your fingers with the sampler's denoise. Star Image2Latent wraps encode-and-noise into one small node with a single noise_amount slider, which is exactly the on-ramp beginners want for image-to-image work.

What it does

You hand it an image and a vae, and it encodes the pixels into a latent. Then the useful part: at noise_amount above 0 it blends the clean latent toward random noise - (1 - noise_amount) * latent + noise_amount * noise under the hood. That premixed noise is what tells the sampler "leave some room to re-imagine." Zero means the sampler receives a faithful encoding (good for low-denoise refinement); 1.0 is essentially pure noise (which defeats the purpose). Values around 0.4–0.7 are the classic img2img territory; for a mild restyle, 0.3.

The latent_type dropdown - SD, SDXL, SD3.5, FLUX - doesn't do any heavy lifting in the encode itself; it's a channel sanity check. It warns you when the latent's channel count doesn't match the model family you claimed: SD/SDXL/SD3.5 expect 4-channel latents, FLUX expects 8. Get this wrong and you've wired an SDXL VAE into a FLUX sampler, which will fail cryptically downstream. Picking the right family just catches that early - it's a friendly nudge, not magic.

Where it sits in a workflow

The classic arrangement: Load Image → this node → KSampler (with low denoise) → VAE Decode. It's also the natural first hop for inpainting-style edits where you re-encode an existing image and blend it into a fresh generation. Because the output is a standard LATENT, everything downstream just works - you can wire it straight into a sampler's latent input, same as an Empty Latent.

The inputs

  • image - your source pixels.
  • vae - from any VAE loader; must match the model family you're sampling with.
  • noise_amount (0–1, default 0) - how much creative freedom the sampler gets. The dial to actually use.
  • latent_type - the family check described above.

Single output: latent.

Installing

It's one node in the StarNodes pack - install Starnodes via ComfyUI Manager, or:

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

Restart, then search star on the canvas. No models or extra dependencies.

Common issues

The channel-count warning is the one real trap - if you see it, your VAE and your sampler disagree about the model family, and no amount of denoise fiddling fixes that. Also, noise_amount is not the same as sampler denoise; they compound. If you pre-noise at 0.5 and run the sampler at 0.5 denoise, you've effectively changed the image twice, and output drifts further than either number alone suggests. Pick one place to control change - most people find the node's own slider is the clearer one.

Category⭐StarNodes/Image And Latent

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
vaeVAE
noise_amountFLOAT0.000–1
latent_typeCOMBO4 options: SD, SDXL, SD3.5, FLUX

Outputs (1)

NameTypeDescription
latentLATENT