Nodes/ComfyUI-ShellAgent-Plugin/Input Image (ShellAgent Plugin)
ComfyUI Node

Input Image (ShellAgent Plugin)

The front door for the image your app sends

By myshell-ai·Created 2 years ago·Updated 3 months ago· 45
Input Image (ShellAgent Plugin)
    • IMAGE
    • MASK
    input_nameinput_image
    default_value
    description
    encryptfalse

    Input Image (ShellAgent Plugin) is the node that receives the image when an app hands one to your workflow. Think of it as the front door: it takes a file name (the thing ShellAgent uploads or references), loads it into ComfyUI as a proper IMAGE tensor, and also gives you a MASK - which saves you the Load Image + Convert to Mask dance most workflows need anyway.

    Outside the ShellAgent context it still works as a plain, slightly smarter image loader. It reads from ComfyUI's input directory, and you can drag a file straight onto the default_value widget to upload it, same as the built-in Load Image.

    How it works

    The node builds its default_value dropdown from whatever image files are sitting in your input folder, so it behaves like a file picker. Run it and it decodes the image, transposes EXIF orientation, converts to RGB, and returns a float32 tensor in IMAGE plus the matching MASK in the second socket. Two things make it less boring than the stock loader:

    • HEIC support. The pack registers pillow_heif, so iPhone photos load without a conversion step. Handy if your app feeds you Apple-format images.
    • Encrypted input. Flip encrypt and it XOR-decrypts the file before loading using the pack's fixed key (ShellAgentSecretKey2024! - a string hardcoded in the source, not a secret you manage). This pairs with the Save Image node's encrypt toggle: save with encryption in one workflow, load with it in another.

    Inputs and outputs

    The fields you'll actually set:

    • input_name - the name ShellAgent uses for this input. Defaults to input_image.
    • default_value - the file to load, chosen from the dropdown or uploaded by dragging. This is also the value the app can override at runtime.
    • description - optional text shown to the app's user. Ignore it if you're not building a ShellAgent UI.
    • encrypt - leave off unless you're round-tripping encrypted files through this pack.

    Outputs are IMAGE and MASK, both single tensors. The MASK output is a genuinely useful bonus - you can wire it straight into inpaint workflows without an extra node.

    Installing it

    It's part of the single MyShell pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/myshell-ai/ComfyUI-ShellAgent-Plugin
    

    then restart ComfyUI. Or search ComfyUI-ShellAgent-Plugin in ComfyUI Manager. The pack installs pillow_heif and opencv-python along the way, so the first startup after install takes a bit longer. No model downloads - this is plumbing, not weights.

    Common issues

    • "The image cannot be identified" error. Usually a corrupt or non-image file in the input folder. The node falls back from PIL to OpenCV decoding, and if both fail, that's the message.
    • HEIC doesn't load. Make sure the pack actually installed pillow_heif; if you cloned it manually without running pip on requirements.txt, HEIC support silently isn't there.
    • The dropdown is empty. No files in your input directory yet. Drag an image onto the widget to upload one.
    • Encrypted image looks like garbage. You toggled encrypt on a file that was never encrypted - or it was encrypted with a different key. The node tries a fallback to plain decoding, but if both paths fail you'll see an error rather than a working image.

    This is one of the two input nodes in the pack with real impressions, and it's the one you'll reach for when your workflow's entry point is a picture.

    Categoryshellagent

    Inputs (4)

    NameTypeDefaultDescription
    input_nameSTRINGinput_image
    default_valueCOMBO3 options: brekkie.jpg, example.png, plantpot.png
    descriptionoptSTRING
    encryptoptBOOLEANfalseIf enabled, the image file will be decrypted before loading (must be encrypted with XOR using ShellAgentSecretKey2024!)

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK