feat(browser): Load models into workflow + trigger-word polish #2

Open
cinnabrad wants to merge 1 commit from feat/load-into-workflow-trigger-words into v2-phase0-refactor
Owner

What

Load into workflow button on installed model cards and detail file rows. Drops the model filename into a loader node combo widget.

Target resolution (smart): selected compatible node → configured default class already in graph → any matching loader → create a new node.

Backend

  • GET /comfychair/node-types — introspects NODE_CLASS_MAPPINGS via workflow_synth, lists loader classes per folder type matched by combo widget name (ckpt_name/lora_name/…). Auto-discovers custom loader packs.
  • default_target_nodes config (dict; round-trips via existing config GET/POST).

Settings

  • Load Targets — dropdown per model type to choose the default loader node.

Trigger words

  • Installed cards now carry trainedWords.
  • Detail view Trigger Words section gets Copy all.
  • Loading a LoRA surfaces its trigger words in a toast (non-destructive).

Verification

  • node --check js/browser.js · py_compile
  • Live end-to-end pending a ComfyUI restart (not done to avoid interrupting the running instance).

Defaults chosen (no answer given on the design questions)

  • Load target: smart (selected → configured → create)
  • LoRA: set the lora_name widget only (no auto-wiring)
  • Trigger words: card data + detail Copy-all + LoRA-load toast
## What **Load into workflow** button on installed model cards and detail file rows. Drops the model filename into a loader node combo widget. Target resolution (smart): selected compatible node → configured default class already in graph → any matching loader → create a new node. ### Backend - `GET /comfychair/node-types` — introspects `NODE_CLASS_MAPPINGS` via `workflow_synth`, lists loader classes per folder type matched by combo widget name (`ckpt_name`/`lora_name`/…). Auto-discovers custom loader packs. - `default_target_nodes` config (dict; round-trips via existing config GET/POST). ### Settings - **Load Targets** — dropdown per model type to choose the default loader node. ### Trigger words - Installed cards now carry `trainedWords`. - Detail view Trigger Words section gets **Copy all**. - Loading a LoRA surfaces its trigger words in a toast (non-destructive). ## Verification - `node --check js/browser.js` ✅ · `py_compile` ✅ - Live end-to-end pending a ComfyUI restart (not done to avoid interrupting the running instance). ## Defaults chosen (no answer given on the design questions) - Load target: smart (selected → configured → create) - LoRA: set the `lora_name` widget only (no auto-wiring) - Trigger words: card data + detail Copy-all + LoRA-load toast
Adds a 'Load into workflow' button to installed model cards and detail
file rows that drops the model's filename into a loader node's combo
widget. Target resolution: selected compatible node -> configured default
class already in the graph -> any matching loader -> create a new node.

- Backend: GET /comfychair/node-types introspects NODE_CLASS_MAPPINGS
  (via workflow_synth) to list loader classes per folder type, matched by
  the well-known combo widget name (ckpt_name/lora_name/vae_name/...), so
  custom loader packs are auto-discovered. New default_target_nodes config
  (dict, round-trips through the existing config GET/POST).
- Settings: 'Load Targets' dropdown per model type (mirrors the
  base-model-favorites custom widget pattern).
- Trigger words: installed cards now carry trainedWords; detail view gets
  a 'Copy all' button; loading a LoRA surfaces its trigger words in a toast.

Frontend validated with node --check; Python with py_compile. Live verify
pending a ComfyUI restart.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cinnabrad changed target branch from main to fix/no-full-rescan-after-download 2026-07-17 12:55:28 +00:00
cinnabrad changed target branch from fix/no-full-rescan-after-download to v2-phase0-refactor 2026-07-17 12:55:39 +00:00
This pull request has changes conflicting with the target branch.
  • api.py
  • js/browser.js
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/load-into-workflow-trigger-words:feat/load-into-workflow-trigger-words
git switch feat/load-into-workflow-trigger-words

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch v2-phase0-refactor
git merge --no-ff feat/load-into-workflow-trigger-words
git switch feat/load-into-workflow-trigger-words
git rebase v2-phase0-refactor
git switch v2-phase0-refactor
git merge --ff-only feat/load-into-workflow-trigger-words
git switch feat/load-into-workflow-trigger-words
git rebase v2-phase0-refactor
git switch v2-phase0-refactor
git merge --no-ff feat/load-into-workflow-trigger-words
git switch v2-phase0-refactor
git merge --squash feat/load-into-workflow-trigger-words
git switch v2-phase0-refactor
git merge --ff-only feat/load-into-workflow-trigger-words
git switch v2-phase0-refactor
git merge feat/load-into-workflow-trigger-words
git push origin v2-phase0-refactor
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cinnabrad/comfyui-comfychair-helper!2
No description provided.