Go to file
Alexander Eichhorn 60d0bcdbc1
Feature(UI): Canvas Workflow Integration - Run Workflow on Raster Layer (#8665)
* feat: Add canvas-workflow integration feature

This commit implements a new feature that allows users to run workflows
directly from the unified canvas. Users can now:

- Access a "Run Workflow" option from the canvas layer context menu
- Select a workflow with image parameters from a modal dialog
- Customize workflow parameters (non-image fields)
- Execute the workflow with the current canvas layer as input
- Have the result automatically added back to the canvas

Key changes:
- Added canvasWorkflowIntegrationSlice for state management
- Created CanvasWorkflowIntegrationModal and related UI components
- Added context menu item to raster layers
- Integrated workflow execution with canvas image extraction
- Added modal to global modal isolator

This integration enhances the canvas by allowing users to leverage
custom workflows for advanced image processing directly within the
canvas workspace.

Implements feature request for deeper workflow-canvas integration.

* refactor(ui): simplify canvas workflow integration field rendering

- Extract WorkflowFieldRenderer component for individual field rendering
- Add WorkflowFormPreview component to handle workflow parameter display
- Remove workflow compatibility filtering - allow all workflows
- Simplify workflow selector to use flattened workflow list
- Add comprehensive field type support (String, Integer, Float, Boolean, Enum, Scheduler, Board, Model, Image, Color)
- Implement image field selection UI with radio

* feat(ui): add canvas-workflow-integration logging namespace

* feat(ui): add workflow filtering for canvas-workflow integration

- Add useFilteredWorkflows hook to filter workflows with ImageField inputs
- Add workflowHasImageField utility to check for ImageField in Form Builder
- Only show workflows that have Form Builder with at least one ImageField
- Add loading state while filtering workflows
- Improve error messages to clarify Form Builder requirement
- Update modal description to mention Form Builder and parameter adjustment
- Add fallback error message for workflows without Form Builder

* feat(ui): add persistence and migration for canvas workflow integration state

- Add _version field (v1) to canvasWorkflowIntegrationState for future migrations
- Add persistConfig with migration function to handle version upgrades
- Add persistDenylist to exclude transient state (isOpen, isProcessing, sourceEntityIdentifier)
- Use es-toolkit isPlainObject and tsafe assert for type-safe migration
- Persist selectedWorkflowId and fieldValues across sessions

* pnpm fix imports

* fix(ui): handle workflow errors in canvas staging area and improve form UX

- Clear processing state when workflow execution fails at enqueue time
  or during invocation, so the modal doesn't get stuck
- Optimistically update listAllQueueItems cache on queue item status
  changes so the staging area immediately exits on failure
- Clear processing state on invocation_error for canvas workflow origin
- Auto-select the only unfilled ImageField in workflow form
- Fix image field overflow and thumbnail sizing in workflow form

* feat(ui): add canvas_output node and entry-based staging area

Add a dedicated `canvas_output` backend invocation node that explicitly
marks which images go to the canvas staging area, replacing the fragile
board-based heuristic. Each `canvas_output` node produces a separate
navigable entry in the staging area, allowing workflows with multiple
outputs to be individually previewed and accepted.

Key changes:
- New `CanvasOutputInvocation` backend node (canvas.py)
- Entry-based staging area model where each output image is a separate
  navigable entry with flat next/prev cycling across all items
- Frontend execute hook uses `canvas_output` type detection instead of
  board field heuristic, with proper board field value translation
- Workflow filtering requires both Form Builder and canvas_output node
- Updated QueueItemPreviewMini and StagingAreaItemsList for entries
- Tests for entry-based navigation, multi-output, and race conditions

* Chore pnp run fix

* Chore eslint fix

* Remove unused useOutputImageDTO export to fix knip lint

* Update invokeai/frontend/web/src/features/controlLayers/components/CanvasWorkflowIntegration/useCanvasWorkflowIntegrationExecute.tsx

Co-authored-by: dunkeroni <dunkeroni@gmail.com>

* move UI text to en.json

* fix conflicts merge with main

* generate schema

* Chore typegen

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
Co-authored-by: dunkeroni <dunkeroni@gmail.com>
2026-04-07 03:25:06 +00:00
.dev_scripts Apply black 2023-07-27 10:54:01 -04:00
.github chore(CI/CD): add pfannkuchensack to codeowners for backend (#8915) 2026-02-25 21:30:49 -05:00
coverage combine pytest.ini with pyproject.toml 2023-03-05 17:00:08 +00:00
docker bugfix(docker) Ensure the correct extra install. 2025-07-17 04:19:22 +00:00
docs docs: Fix typo in contributing guide - remove extra 'the' (#8949) 2026-03-09 18:03:32 +00:00
invokeai Feature(UI): Canvas Workflow Integration - Run Workflow on Raster Layer (#8665) 2026-04-07 03:25:06 +00:00
scripts Feature(backend): Add a command-line utility for running gallery maintenance (#8827) 2026-02-16 23:44:19 +00:00
tests Added If node and ability to link an Any output to a node input if cardinality matches (#8869) 2026-04-06 03:26:26 +00:00
.dockerignore refactor Dockerfile; get rid of multi-stage build; upgrade to python 3.12 2025-04-04 18:42:13 +11:00
.editorconfig Merge dev into main for 2.2.0 (#1642) 2022-11-30 16:12:23 -05:00
.git-blame-ignore-revs Git blame ignore revs 2025-03-26 12:56:04 +11:00
.gitattributes refactor: model manager v3 (#8607) 2025-10-15 10:18:53 +11:00
.gitignore Chore: Fix weblate merge conflicts (#8744) 2026-01-08 15:25:11 -05:00
.gitmodules remove src directory, which is gumming up conda installs; addresses issue #77 2022-08-25 10:43:05 -04:00
.nvmrc update nodes schema / typegen 2025-04-04 18:42:13 +11:00
.pre-commit-config.yaml chore: update pre-commit syntax; add check for uv.lock needing an update 2025-04-15 07:41:32 +10:00
.prettierrc.yaml feat: automated releases via github action 2024-02-29 21:57:20 -05:00
flake.lock update flake (#7032) 2024-10-08 10:55:49 +11:00
flake.nix update flake (#7032) 2024-10-08 10:55:49 +11:00
InvokeAI_Statement_of_Values.md Add @ebr to Contributors (#2095) 2022-12-21 14:33:08 -05:00
LICENSE Update LICENSE 2023-07-05 23:46:27 -04:00
LICENSE-SD1+SD2.txt updated LICENSE files and added information about watermarking 2023-07-26 17:27:33 -04:00
LICENSE-SDXL.txt updated LICENSE files and added information about watermarking 2023-07-26 17:27:33 -04:00
Makefile Run vitest during frontend build (#9022) 2026-04-05 19:18:24 -04:00
mkdocs.yml feat(multiuser mode): Support multiple isolated users on same backend (#8822) 2026-02-26 23:47:25 -05:00
pins.json chore: bump torch to 2.7.0 2025-05-19 12:29:51 +10:00
pyproject.toml feat(multiuser mode): Support multiple isolated users on same backend (#8822) 2026-02-26 23:47:25 -05:00
README.md docs: Fix typo in README.md - 'easy' should be 'ease' (#8948) 2026-03-09 18:01:54 +00:00
SECURITY.md Create SECURITY.md 2024-11-25 04:10:03 -08:00
Stable_Diffusion_v1_Model_Card.md Global replace [ \t]+$, add "GB" (#1751) 2022-12-19 16:36:39 +00:00
USER_ISOLATION_IMPLEMENTATION.md feat(multiuser mode): Support multiple isolated users on same backend (#8822) 2026-02-26 23:47:25 -05:00
uv.lock Upgrade spandrel version (#8996) 2026-04-05 14:28:15 -04:00

project hero

Invoke - Professional Creative AI Tools for Visual Media

discord badge latest release badge github stars badge github forks badge CI checks on main badge latest commit to main badge github open issues badge github open prs badge translation status badge

Invoke is a leading creative engine built to empower professionals and enthusiasts alike. Generate and create stunning visual media using the latest AI-driven technologies. Invoke offers an industry leading web-based UI, and serves as the foundation for multiple commercial products.

  • Free to use under a commercially-friendly license
  • Download and install on compatible hardware
  • Generate, refine, iterate on images, and build workflows

Highlighted Features - Canvas and Workflows


📣 Are you a new or returning InvokeAI user?

Take our first annual User's Survey


Documentation

Quick Links
Installation and Updates - Documentation and Tutorials - Bug Reports - Contributing

Installation

To get started with Invoke, Download the Launcher.

Troubleshooting, FAQ and Support

Please review our FAQ for solutions to common installation problems and other issues.

For more help, please join our Discord.

Features

Full details on features can be found in our documentation.

Web Server & UI

Invoke runs a locally hosted web server & React UI with an industry-leading user experience.

Unified Canvas

The Unified Canvas is a fully integrated canvas implementation with support for all core generation capabilities, in/out-painting, brush tools, and more. This creative tool unlocks the capability for artists to create with AI as a creative collaborator, and can be used to augment AI-generated imagery, sketches, photography, renders, and more.

Workflows & Nodes

Invoke offers a fully featured workflow management solution, enabling users to combine the power of node-based workflows with the ease of a UI. This allows for customizable generation pipelines to be developed and shared by users looking to create specific workflows to support their production use-cases.

Invoke features an organized gallery system for easily storing, accessing, and remixing your content in the Invoke workspace. Images can be dragged/dropped onto any Image-base UI element in the application, and rich metadata within the Image allows for easy recall of key prompts or settings used in your workflow.

Other features

  • Support for both ckpt and diffusers models
  • SD1.5, SD2.0, SDXL, and FLUX support
  • Upscaling Tools
  • Embedding Manager & Support
  • Model Manager & Support
  • Workflow creation & management
  • Node-Based Architecture

Contributing

Anyone who wishes to contribute to this project - whether documentation, features, bug fixes, code cleanup, testing, or code reviews - is very much encouraged to do so.

Get started with contributing by reading our contribution documentation, joining the #dev-chat or the GitHub discussion board.

We hope you enjoy using Invoke as much as we enjoy creating it, and we hope you will elect to become part of our community.

Thanks

Invoke is a combined effort of passionate and talented people from across the world. We thank them for their time, hard work and effort.

Original portions of the software are Copyright © 2024 by respective contributors.