[GH-ISSUE #922] [Feature]: Add ComfyUI workflow placeholder for uploaded reference images (vanilla LoadImage) #448

Closed
opened 2026-10-20 17:28:59 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Yasyasyasvil on GitHub (May 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/922

What problem does this solve?

ComfyUI image-generation connections support reference images via the %reference_image% workflow placeholder, which inlines the image as a base64 string. Loading that base64 inside ComfyUI requires a non-standard custom node (e.g. ETN_LoadImageBase64 from comfyui-tooling-nodes). Users running a vanilla ComfyUI install, or workflows authored around the built-in LoadImage node, have no way to use a reference image today.

LoadImage expects a filename that exists in ComfyUI's input/ directory, not raw base64. ComfyUI already exposes a POST /upload/image endpoint specifically for this purpose, but Marinara currently doesn't call it.

Proposed solution

Add a second workflow placeholder, %reference_image_name%, that:

  1. Uploads the reference image to ComfyUI's input/ folder via POST /upload/image (multipart, overwrite=true, content-hashed filename for dedup).
  2. Substitutes the filename returned by ComfyUI into the workflow.

So a vanilla LoadImage node like:

"8": {
  "inputs": { "image": "%reference_image_name%" },
  "class_type": "LoadImage"
}

…would Just Work, no custom decode node required.

Alternatives considered

Keeping only the %reference_image% placeholder and adding a setting on the image generator connection that decides whether %reference_image% will use base64 or upload the image and use the file name.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Yasyasyasvil on GitHub (May 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/922 ## What problem does this solve? ComfyUI image-generation connections support reference images via the `%reference_image%` workflow placeholder, which inlines the image as a base64 string. Loading that base64 inside ComfyUI requires a non-standard custom node (e.g. `ETN_LoadImageBase64` from comfyui-tooling-nodes). Users running a vanilla ComfyUI install, or workflows authored around the built-in `LoadImage` node, have no way to use a reference image today. `LoadImage` expects a filename that exists in ComfyUI's `input/` directory, not raw base64. ComfyUI already exposes a `POST /upload/image` endpoint specifically for this purpose, but Marinara currently doesn't call it. ## Proposed solution Add a second workflow placeholder, `%reference_image_name%`, that: 1. Uploads the reference image to ComfyUI's `input/` folder via `POST /upload/image` (multipart, `overwrite=true`, content-hashed filename for dedup). 2. Substitutes the filename returned by ComfyUI into the workflow. So a vanilla LoadImage node like: ```json "8": { "inputs": { "image": "%reference_image_name%" }, "class_type": "LoadImage" } ``` …would Just Work, no custom decode node required. ## Alternatives considered Keeping only the `%reference_image%` placeholder and adding a setting on the image generator connection that decides whether `%reference_image%` will use base64 or upload the image and use the file name. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:28:59 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (May 17, 2026):

Thank you for the PR, merged!

<!-- gh-comment-id:4470107061 --> @SpicyMarinara commented on GitHub (May 17, 2026): Thank you for the PR, merged!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#448
No description provided.