Nodes/Stable Projectorz Bridge/Projectorz Init Input
ComfyUI Node

Projectorz Init Input

Pulling the init image (and its brush-fill mask) out of Stable Projectorz

By tianlang0704·Created 2 years ago·Updated 2 years ago· 47
Projectorz Init Input
    • IMAGE
    • MASK
    index0
    name_prefixProjectorInitBlob_
    mask_channel

    If you're using Stable Projectorz to paint over existing texture or do brush-fill repairs, the workflow starts with an init image, and ProjectorzInitInput is the node that hands it to your graph. It's the img2img sibling of ProjectorzControlnetInput: same idea, same blob-file mechanism, but for the starting image and the mask Projectorz drew on top of it.

    Here's the sequence. You click something in Projectorz that starts an img2img pass, the app posts to the bridge's /sdapi/v1/img2img endpoint, and the bridge saves the init image as ProjectorInitBlob_<session>_<index>.png plus the mask as ..._mask.png into ComfyUI's input/ folder. It then queues your workflow, and this node loads both files back. The index you set just has to match which image in the batch you're reading.

    The inputs

    • index - which init image of the batch. Default 0.
    • name_prefix - default ProjectorInitBlob_. Auto-managed by the bridge's frontend extension at runtime; don't touch it.
    • mask_channel - this one's interesting, and it's where people get confused. It's a dropdown of red / green / blue / alpha. The mask Projectorz uploads can be delivered one of two ways: as a color image with the mask packed into one of the RGB channels, or as a separate mask PNG whose alpha carries it. Pick the channel that matches. If you choose red/green/blue it reads that channel from the mask image; alpha reads the mask PNG's alpha instead.

    The outputs

    • IMAGE - the init image tensor. Goes to your VAE encode (for standard img2img) or straight into a Flux/Qwen-style edit workflow as the source image.
    • MASK - the mask tensor, ready to wire into a sampler's denoise masking or an inpaint node.

    Both outputs are standard ComfyUI types, so they drop into whatever you already use for img2img - that's the real point of this pack. You get to build the img2img pipeline however you want in ComfyUI (latent noise masking, inpaint models, flux-fill style edits), and Projectorz stays ignorant of it all, still thinking it's talking to an A1111 server.

    Install

    Identical to the rest of the pack - Manager (search "Stable Projectorz Bridge") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/tianlang0704/ComfyUI-StableProjectorzBridge
    

    Restart. No model downloads, no extra dependencies.

    Gotchas

    The mask_channel setting is the fiddly bit, and there's no universal right answer - it depends on how Projectorz packs the mask for the operation you ran. If your inpaint is clearly ignoring the mask, flip through the channels. The other thing to remember is the silent-blank behavior: like the controlnet input, this node loads through ComfyUI's LoadImage, which substitutes a plain 512×512 white placeholder when a file is missing instead of erroring. That means "my init image came out blank" usually means the prefix got mangled or the workflow ran outside of Projectorz's request cycle - the blob only exists for the lifetime of one generation session.

    CategoryProjectorz

    Inputs (3)

    NameTypeDefaultDescription
    indexINT0
    name_prefixSTRINGProjectorInitBlob_
    mask_channelCOMBO4 options: red, green, blue, alpha

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK