Nodes/comfyui_LLM_party/path2img tool
ComfyUI Node

path2img tool

Let your agent turn a file path into an actual image

By heshengtao·Created 2 years ago·Updated 6 days ago· 2,321
path2img tool
    • tool
    is_enabletrue

    An LLM can know about a file path as a string - from something the user typed, from a prior tool call's result, from wherever - without that being useful to the rest of your graph. ComfyUI nodes need an actual IMAGE object, not a path. path2img tool bridges that gap: it hands the agent the ability to take a path it already knows about and load it as real image data, on its own, mid-conversation.

    How it works

    Wire the tool output into an LLM/agent node's tool-list input. When the model decides it needs to actually see or use an image it has a path for, it calls this tool, and the resulting IMAGE flows back into the tool-calling loop for the rest of the conversation, or into whatever downstream nodes are wired to make use of it.

    The inputs and outputs that matter

    • is_enable - the only input, the pack's standard bypass toggle.

    One output: tool (STRING) - wire it into your agent's tool-list input, the same pattern every _tool-suffixed node in this pack follows.

    Where it fits

    This is most useful in agent workflows that already involve the model discovering files on its own - after a tool like Open Web or a filesystem-browsing tool surfaces a path, or when a user directly tells the agent "load the image at this path." Without a tool like this, the agent can only ever talk about a path; it can't actually turn it into pixels the rest of your graph can work with.

    How to install it

    • ComfyUI Manager: search "comfyui_LLM_party", install, restart.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, then pip install -r requirements.txt from inside the pack folder using ComfyUI's own Python, then restart.

    No API keys of its own - it needs whatever LLM node you've already configured, since the model decides when to call it.

    Common issues & troubleshooting

    The path the agent tries to load doesn't exist. The file has to be reachable from wherever the ComfyUI process is actually running, not from your own machine - if you're on a remote or cloud GPU worker, a path that only exists on your laptop is meaningless to it. Paths that work reliably are usually ones another step in the same workflow already placed there.

    The LLM never calls the tool. Same as any tool-calling setup in this pack - the model needs a reason from its instructions to reach for it. If your persona doesn't establish that it can load images from disk, it may just describe what it imagines instead.

    The call fails outright. Confirm the LLM node this tool is wired into actually supports tool/function calling - not every model or API configuration does, and one that can't will either skip the tool or hallucinate a result instead of really loading anything.

    Category大模型派对(llm_party)/工具(tools)/实用(Utility)

    Inputs (1)

    NameTypeDefaultDescription
    is_enableBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    toolSTRING