feat: add single-image preview node, fix text-only detection for multi-input models#205
Open
iammojogo-sudo wants to merge 2 commits into
Open
feat: add single-image preview node, fix text-only detection for multi-input models#205iammojogo-sudo wants to merge 2 commits into
iammojogo-sudo wants to merge 2 commits into
Conversation
…eviewNode to use data URLs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Files changed
src/areas/workflows/nodes/ImagePreviewNode.tsx— new: single-image preview node using data URLssrc/areas/workflows/workflowRunStore.ts— fixed text-only detection for multi-input models, simplified multi-input routing, addedextraParams.textsrc/areas/workflows/WorkflowsPage.tsx— registeredimagePreviewNodein node palette and type helperssrc/areas/workflows/preflight.ts— registeredimagePreviewNodein preflight checksNew: ImagePreviewNode
A general single-image preview node for workflows. Reads the output file
from disk via
window.electron.fs.readFileBase64()and renders as adata:URL — avoids CSP issues and API origin dependency. Has apass-through image output so it can sit inline between nodes.
Fix: text-only model detection
A model is text-only only if all its declared inputs are
"text".Previously the check only looked at the first input, which incorrectly
treated multi-input models like Flux/Qwen (
"inputs": ["text", "image"])as text-only and sent a 1×1 placeholder instead of the real image.
Additional
src.outputTypeinstead of slot-based matchingextraParams.textalongsideextraParams.promptfor generator compatibilityNOTE: Includes changes also from #193 and #203