Comfy-Org/ComfyUI_frontend

[Feature Request]: Migrate Node Templates to Workflows

Ouverte

#4 056 ouverte le 2 juin 2025

 (0 commentaire) (1 réaction) (0 personne assignée)TypeScript (610 forks)github user discovery
Designarea:workflowsenhancementhelp wanted

Métriques du dépôt

Stars
 (1 838 étoiles)
Métriques de merge PR
 (Merge moyen 4j 21h) (881 PRs mergées en 30 j)

Description

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

This feature would remove the legacy "Node Templates" functionality and integrate it with the modern Workflows system. Currently, Node Templates allows users to save node/group selections as reusable templates (stored as JSON files), but this functionality has become obsolete since the introduction of the "workflow insert" feature.

The proposed changes would:

  1. Remove "Node Templates >" from the canvas right-click menu
  2. Change "Save Selected as Template" to "Save Selected as Workflow..."
  3. Save the selection as a workflow that appears in the workflows sidebar
  4. Provide automatic migration for existing template JSON files to workflows

This consolidation would simplify the UI and provide a more consistent user experience by having a single system for saving and reusing node configurations.

Proposed workflow

  1. User selects multiple nodes on the canvas
  2. Right-click → "Save Selected as Workflow..."
  3. Enter a name for the workflow
  4. The selection is saved as a workflow and appears in the Workflows sidebar
  5. User can insert it later by:
    • Right-clicking the workflow in the sidebar → "Insert"
    • ... maybe there should be a better way for user to do this or discover how to do it

For existing users with saved templates:

  1. On first launch after the update, detect existing comfy.templates.json file
  2. Automatically migrate each template to a workflow (optionally in a "Migrated Templates" folder)
  3. Notify user of the migration with option to review

Additional information

Related Issues: This consolidates and builds upon existing feature requests:

  • #1801 - Manage node templates in workflow sidebar tab
  • #1012 - Add the node templates manager to the sidebar

Technical Details:

  • Node templates are currently stored in comfy.templates.json via the user data API
  • Implementation is in src/extensions/core/nodeTemplates.ts
  • Templates include node data and group node configurations
  • The feature supports import/export of template collections

Benefits:

  • Reduces UI complexity by removing redundant functionality
  • Provides better discoverability (workflows sidebar is more visible than buried menu option)
  • Leverages existing workflow management features (folders, search, etc.)
  • Maintains backward compatibility through automatic migration

Implementation Notes:

  • Migration should convert existing templates to workflow format
  • Templates folder in workflows sidebar should have distinct styling
  • Preserve template naming and organization during migration
  • Consider adding some default/example templates for new users (as suggested in #1012)

┆Issue is synchronized with this Notion page by Unito

Guide contributeur