Nodes/ComfyUI-aihub-workflow-exposer/AIHub Expose Project Image
ComfyUI Node

AIHub Expose Project Image

Grab an image file the project already stored — no canvas, no fuss

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Expose Project Image
    • IMAGE
    • MASK
    • WIDTH
    • HEIGHT
    idexposed_image
    file_nameimage.png
    optionalfalse

    AIHub Expose Project Image is the project-file counterpart to AIHubExposeImage. Instead of pulling an image live from an editor's canvas, it loads an image file that the AIHub project has already stored - outputting IMAGE, MASK, WIDTH, and HEIGHT. If the expose nodes are "sockets the client fills," this is the node that reads what earlier workflow runs (or the client itself) saved into the project's file storage.

    Quick project recap, because this is where the naming makes sense: an AIHub project is client-managed state attached to a workflow (or chain of workflows). A workflow gets one when its AIHubWorkflowController sets a project_type and the project's already initialized. Files live wherever the client decides - the README's baseline is a folder, but the server doesn't dictate the layout. When the client runs the workflow, it tells the server which project file this node means, the server injects the resolved path as a hidden input, and the node loads it through ComfyUI's own image loader (flipping ComfyUI's inverted mask back to normal on the way out, same as the canvas image node).

    What you set

    • file_name - the image file as stored in the project, extension included (image.png by default). This is the one input you'll actually change.
    • optional - set true and a missing file returns zeros instead of aborting the run.
    • id - the protocol field id (alphanumeric, _, -).

    That's the whole surface. No type, no label, no position outputs - this node has no canvas concept. It's a pure file read, which makes it the right tool whenever the image's origin doesn't matter, only its existence in the project.

    Where it fits

    This pairs naturally with the action nodes that write images into projects - AIHubActionNewImage with APPEND or REPLACE. Workflow A generates an intermediate image and stores it in the project; workflow B reads it back with this node and continues. Because the file lives in the project, a chain of workflows can hand images to each other without any of the client's UI ever displaying a file picker.

    Install & gotchas

    Standard pack install: ComfyUI Manager → search ComfyUI-aihub-workflow-exposer, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
    

    then restart. No requirements.txt, no model downloads.

    Two gotchas. First, the usual project one: no project context means no files, and a missing file with optional off raises a hard error naming the file - which is actually the helpful behavior, so don't preemptively flip optional on and trade a clear error for silent zeros. Second, file_name must match exactly what the writing node stored, including extension and case; Image.png versus image.png are different files to a case-sensitive filesystem. If you're reading back something another workflow wrote, keep the filename in one place instead of retyping it in two.

    Categoryaihub/expose/config

    Inputs (3)

    NameTypeDefaultDescription
    idSTRINGexposed_imageA unique custom ID for this workflow.
    file_nameSTRINGimage.pngThe name of the image as stored in the project files, including extension
    optionalBOOLEANfalseIf set to true, it will not raise an error if the image is not found

    Outputs (4)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK
    WIDTHINT
    HEIGHTINT