Skip to content

feat: add single-image preview node, fix text-only detection for multi-input models#205

Open
iammojogo-sudo wants to merge 2 commits into
lightningpixel:devfrom
iammojogo-sudo:fix/preview-image-data-url
Open

feat: add single-image preview node, fix text-only detection for multi-input models#205
iammojogo-sudo wants to merge 2 commits into
lightningpixel:devfrom
iammojogo-sudo:fix/preview-image-data-url

Conversation

@iammojogo-sudo

@iammojogo-sudo iammojogo-sudo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Files changed

  • src/areas/workflows/nodes/ImagePreviewNode.tsxnew: single-image preview node using data URLs
  • src/areas/workflows/workflowRunStore.ts — fixed text-only detection for multi-input models, simplified multi-input routing, added extraParams.text
  • src/areas/workflows/WorkflowsPage.tsx — registered imagePreviewNode in node palette and type helpers
  • src/areas/workflows/preflight.ts — registered imagePreviewNode in preflight checks

New: ImagePreviewNode

A general single-image preview node for workflows. Reads the output file
from disk via window.electron.fs.readFileBase64() and renders as a
data: URL — avoids CSP issues and API origin dependency. Has a
pass-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

  • Simplified multi-input routing to use src.outputType instead of slot-based matching
  • Added extraParams.text alongside extraParams.prompt for generator compatibility

NOTE: Includes changes also from #193 and #203


image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants