Skip to content

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

Open
iammojogo-sudo wants to merge 3 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 3 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.tsx — new (created + our update)
src/areas/workflows/WorkflowsPage.tsx — registration (1 line add)
src/areas/workflows/preflight.ts — registration (1 line add)

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

image
image

@iammojogo-sudo
iammojogo-sudo force-pushed the fix/preview-image-data-url branch from 9877a72 to 1fb218c Compare June 24, 2026 18:41
@iammojogo-sudo iammojogo-sudo changed the title feat: add single-image preview node, fix text-only detection for multi-input models feat/add single-image preview node, fix text-only detection for multi-input models Jun 24, 2026

@iammojogo-sudo iammojogo-sudo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so there will be a ForEachNode addition to the preview, or will that be specifically a variable used for statement checking?

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.

1 participant