mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #973] [Feature]: Fall back to a 1×1 placeholder image when ComfyUI workflows use %reference_image%/%reference_image_name% with no reference #475
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#475
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 @Yasyasyasvil on GitHub (May 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/973
Originally assigned to: @cha1latte on GitHub.
What problem does this solve?
For ComfyUI custom workflows that support reference-image placeholders
%reference_image%/%reference_image_name%but the generation request has no reference image, the substitution code skips the replacement entirely. The literal%reference_image%/%reference_image_name%text is sent to ComfyUI inside the workflow JSON, and the LoadImage chain crashes when it tries to decode the placeholder as base64 or look up that filename.ComfyUI workflows can be designed to be dual-purpose: they run as image-to-image when a reference is supplied and as text-to-image when one isn't. In both modes the LoadImage node still needs a valid image to load.
This is easy to trigger through normal product paths, for example:
Proposed solution
Add a per-connection setting on the ComfyUI workflow editor, a checkbox labelled "Upload a 1×1 placeholder when no reference image is provided".
Behavior when the setting is enabled and the request has no reference image:
%reference_image%-> base64 of a bundled 1×1 PNG%reference_image_name%-> filename returned from uploading that same 1×1 PNG via/upload/image.Behavior when the setting is disabled: preserve today's behavior (the placeholders remain unsubstituted and the workflow will fail if it depends on them)
Alternatives considered
Additional context
The substitution is a simple change to image-generation.ts
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (May 18, 2026):
Triage note: labeling this as
normal-scopebecause it is a focused ComfyUI reliability option for an existing workflow-editor placeholder path, with current behavior preserved when the setting is disabled.This can stay in the normal enhancement backlog as a bounded image-generation compatibility improvement.