mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #299] [Issue]: No way to utilize reference images with ComfyUI. #121
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @emersonsorrel on GitHub (Apr 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/299
Summary
The app provides the ability to use reference images with ComfyUI, however the current implementation doesn't properly pass them to the workflow using the %reference_image% placeholder.
Expected behavior
The character reference image should be passed to an image-capable model (Qwen Image Edit or Flux Klein, for instance) using the %reference_image% placeholder in the ComfyUI JSON. This should provide the model a starting point for the character's expected look and features.
Actual behavior
%reference_image% is not updated with a file name prior to being sent to the ComfyUI workflow. Error produced: "FileNotFoundError: [Errno 2] No such file or directory: '/Applications/Data/Packages/ComfyUI/input/%reference_image%'"
Steps to reproduce
Environment
b8d82caLogs, screenshots, or video
Additional context
I attempted to troubleshoot with Claude to see if there was some way to format my JSON that would just make it work, but no success. Claude's suggestion was such:
The error tells you everything:
'/Applications/Data/Packages/ComfyUI/input/%reference_image%'— Marinara is doing a simple string substitution of%variable%tokens in the workflow JSON and passing the result straight to ComfyUI's/promptAPI. That works fine for strings like%prompt%and%seed%, but%reference_image%is a special case becauseLoadImagedoesn't accept an arbitrary path — it only accepts filenames relative to its own/input/directory.So you have two options depending on how far you want to take this:
Option 1 — The easy workaround (no code changes)
Pre-copy your reference image into ComfyUI's input folder and just use the filename directly in the workflow. Instead of
%reference_image%as a variable at all, hardcode the filename for now:This bypasses the variable system entirely and at least confirms the rest of your workflow is wired correctly.
Option 2 — Proper integration (requires a code contribution)
Marinara would need to intercept
%reference_image%before sending the workflow, upload the image to ComfyUI viaPOST /upload/image, and substitute the returned filename in its place. That's a feature request / PR for the project rather than something you can fix in the JSON alone.Worth checking their Discord (linked in the README) to see if there's an existing issue or PR for image upload support — it's a pretty natural thing to want once ComfyUI integration is in place.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Apr 28, 2026):
v1.5.6 should address this.