ComfyUI Node

From Photoshop Mask

Grab a Photoshop layer mask as a MASK, not pixels

By Millyarde·Created 57 years ago·Updated 57 years ago· 7
From Photoshop Mask
    • mask
    layerName

    From Photoshop Mask is the most quietly useful node in the Pomfy pack - once the pack works, anyway. Where its sibling From-Photoshop pulls a layer's pixels into the graph, this one pulls a layer's mask as a MASK output. Same idea, different channel: your selection becomes a first-class ComfyUI mask instead of an image you'd have to convert, threshold, and clean up yourself.

    And the catch is the same one that applies to the whole pack: Pomfy's README says, in all caps, THIS PLUGIN IS STILL BEING DEVELOPED, IT DOESN'T WORK YET. The companion Photoshop plugin it depends on isn't published (the Pomfy-Plugin repo 404s right now). So you're reading about intent, not a working feature. Keep that in your back pocket.

    Why does the mask channel matter so much? Because a huge fraction of real ComfyUI work is inpainting, and inpainting lives and dies by its mask. If you've ever done the Photoshop thing - paint a rough mask over a face, a hand, a piece of scenery you want regenerated - you know the selection is the hard, fiddly part, and the generation is the easy part. The community's whole Photoshop comparison boils down to exactly this: Photoshop wins on the "select, mask, fill without leaving the canvas" experience, and ComfyUI wins on control. This node is the hand-off for the part Photoshop is actually good at.

    How it's meant to work

    The MASK data type in ComfyUI is a grayscale channel where white is "apply here" - it's what a VAE Encode or an inpaint sampler uses to know where to regenerate. In Photoshop, a layer mask is exactly that: a grayscale channel on the layer. So the mapping is near enough 1:1, and this node's job is to ship that channel across the plugin bridge without flattening it into RGB pixels. You set the layer name, the plugin reads that layer's mask, and you get a clean MASK out.

    What you set

    • layerName (STRING, required, default "") - the layer whose mask you want. That's the only input. Type the name exactly as it appears in the Layers panel; the default is an empty string, so a blank name means "ask for nothing."

    Output: mask (MASK) - wire it into anything that takes a mask: the mask input of a Set Latent Noise Mask (for inpaint), an InpaintModelConditioning node, or a mask editor to refine it further. That's the payoff: a selection you made in Photoshop becomes the mask your inpaint actually runs on.

    Install

    Boring, standard, same as the rest of Pomfy. ComfyUI Manager → search "Pomfy" → install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Millyarde/Pomfy
    

    Restart ComfyUI. No models, no requirements.txt, no heavy deps - the README lists none, and the only true dependency is the Photoshop plugin that doesn't exist in public yet.

    Troubleshooting

    • "The mask never arrives." Expected today. No plugin, no bridge, no mask. The README warns the plugin isn't finished, and the plugin repo isn't even public, so this isn't something you can fix on your end.
    • Install fails. The Pomfy repo is currently a 404, so the clone step can genuinely fail. If Manager or git errors out, check whether the repo has come back before debugging your environment.
    • Mask comes through but wrong / blank. When it ships, layerName is the one knob and it defaults to "". Match the exact layer name; the mask channel has to exist on that layer.

    If you want a working route from Photoshop selections to ComfyUI masks right now, you're honestly better off with the active Krita-based plugin or just exporting a PNG mask - Pomfy is a promising scaffold with a great idea and no release yet.

    Categoryphotoshop

    Inputs (1)

    NameTypeDefaultDescription
    layerNameSTRING

    Outputs (1)

    NameTypeDescription
    maskMASK