Nodes/Comfy-Photoshop-SD/Generate Latent Noise
ComfyUI Node

Generate Latent Noise

Empty Latent Image with an actual seed

By AbdullahAlfaraj·Created 3 years ago·Updated 2 years ago· 319
Generate Latent Noise
    • LATENT
    width512
    height512
    batch_size1
    seed0

    At a glance this looks like a drop-in replacement for ComfyUI's core Empty Latent Image node - same width, height, and batch size fields - except it also takes a seed. That extra input is the whole story: where Empty Latent Image hands your sampler a blank, all-zero latent and lets the sampler generate its own seeded noise once sampling starts, this node fills the latent with actual seeded Gaussian noise up front, before the sampler ever touches it.

    Why that distinction matters

    Most of the time it doesn't - a KSampler with a fixed seed produces the same image whether the noise came from an all-zero starting latent or a pre-seeded one, because the sampler's own RNG is what actually drives generation. Where it starts to matter is exactly the situation this pack was built for: an external caller (the Auto-Photoshop-SD plugin, or your own script against the API) driving a workflow from outside ComfyUI's UI, where having the seed baked into the starting latent itself - rather than living inside a sampler's internal state - gives you one clean, inspectable value to set and reproduce, independent of whatever sampler node happens to be downstream.

    Inputs

    • width / height (16–16384, step 8, default 512) - the step of 8 isn't arbitrary; it matches the 8× spatial downscale most VAEs use, so anything not a multiple of 8 doesn't map cleanly to a latent size.
    • batch_size (1–4096, default 1) - how many latents to generate at once.
    • seed (0 to roughly 1.8×10¹⁹, the standard ComfyUI seed ceiling) - the value that determines the noise pattern.

    The single output is a LATENT, and it wires into exactly the slot Empty Latent Image would have filled: your KSampler's latent_image input.

    The honest take

    For a workflow you're building and running by hand in the ComfyUI UI, plain Empty Latent Image plus your KSampler's own seed field does the same job with one fewer node to think about - there's no visible reason to prefer this one. It earns its place specifically inside this pack's Photoshop-bridge workflows, where canvas size and seed are both arriving from outside the graph and this node gives that external caller one stable target to set both.

    Installing it

    ComfyUI Manager: search "Comfy-Photoshop-SD", install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AbdullahAlfaraj/Comfy-Photoshop-SD
    

    Where people get burned

    batch_size is the one to watch - cranking it up multiplies your VRAM use directly, same as any batched latent generation, and it's an easy field to leave at a leftover high value from testing. Past that, if you're constructing workflow JSON by hand for an API call rather than clicking through the UI (which is exactly how this pack's Photoshop plugin operates), double-check width/height land on a multiple of 8 - the UI's step control enforces that for you when you're dragging a slider, but a hand-edited value in raw JSON has no such guardrail.

    CategoryAuto-Photoshop-SD

    Inputs (4)

    NameTypeDefaultDescription
    widthINT51216–16384
    heightINT51216–16384
    batch_sizeINT11–4096
    seedINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    LATENTLATENT