feat: add Chatterbox model support for Cloud asset browser#8418
feat: add Chatterbox model support for Cloud asset browser#8418christian-byrne merged 4 commits intomainfrom
Conversation
🎭 Playwright Tests:
|
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/29/2026, 10:35:34 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
📝 WalkthroughWalkthroughProviders may omit an input Changes
Sequence Diagram(s)sequenceDiagram
participant Asset as Asset Importer
participant Store as modelToNodeStore
participant Provider as ModelNodeProvider
participant Widget as WidgetRegistry
participant Graph as Graph
Asset->>Store: request provider for modelType
Store->>Store: findProvidersWithFallback(modelType)
Store-->>Asset: provider (may have empty key)
Asset->>Provider: create node from asset
alt provider.key present
Provider->>Widget: lookup widget by key
Widget-->>Provider: widget or MISSING_WIDGET error
Provider->>Widget: set widget.value = filename
else provider.key absent
Note over Provider,Graph: skip widget handling (auto-load)
end
Provider->>Graph: add created node to root graph
Graph-->>Asset: node added
Possibly related PRs
Suggested reviewers
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 26 kB (baseline 26 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 974 kB (baseline 974 kB) • 🔴 +41 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 471 kB (baseline 471 kB) • 🟢 -8 BConfiguration panels, inspectors, and settings screens
Status: 12 added / 12 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.89 kB (baseline 2.89 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 33.7 kB (baseline 33.7 kB) • ⚪ 0 BReusable component library chunks
Status: 4 added / 4 removed Data & Services — 2.7 MB (baseline 2.7 MB) • 🔴 +749 BStores, services, APIs, and repositories
Status: 8 added / 8 removed Utilities & Hooks — 25.3 kB (baseline 25.3 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 7 added / 7 removed Vendor & Third-Party — 10.7 MB (baseline 10.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 7.1 MB (baseline 7.1 MB) • 🟢 -198 BBundles that do not match a named category
Status: 34 added / 34 removed |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@todo.md`:
- Around line 1-11: Remove the outdated todo.md file from the commit (it tracked
a now-fixed Chatterbox mapping issue) or, if you prefer to keep notes, convert
it into a proper issue in your tracker and delete the file; alternatively, if
retaining the file temporarily, at minimum change the top-level heading to start
with "#" and update content to reference the implemented mapping in the asset
browser mapping helper/module (the code path handling Chatterbox model → node
mapping) so the repo no longer contains stale temporary issue docs.
- Register Chatterbox TTS node mappings in modelToNodeStore: - chatterbox/chatterbox → FL_ChatterboxTTS - chatterbox/chatterbox_turbo → FL_ChatterboxTurboTTS - chatterbox/chatterbox_multilingual → FL_ChatterboxMultilingualTTS - chatterbox/chatterbox_vc → FL_ChatterboxVC - Add hierarchical fallback in findProvidersWithFallback() for model type lookups (e.g., 'parent/child' falls back to 'parent') - Support empty widget key for auto-load nodes (skip widget assignment in createModelNodeFromAsset when provider.key is empty) - Add comprehensive tests for new behavior Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c0849-5650-7060-b4bd-23ef0c8dfa39
da1bdee to
050868c
Compare
|
This code is somewhat temporary, as it will all get replaced when either asset-model strings become first-class types or we start specifying asset/model metadata on the node class. |
Co-authored-by: Alexander Brown <drjkl@comfy.org>
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/stores/modelToNodeStore.ts`:
- Around line 76-95: findProvidersWithFallback currently calls
modelType.split('/') which will throw if modelType is null/undefined or not a
string; add a defensive guard at the top of the function to validate modelType
is a non-empty string (or convert it safely) and early-return undefined for
invalid inputs before doing the exact lookup or split. Update references inside
findProvidersWithFallback to assume modelType is valid after the guard so map
lookups and the split call are safe.
…llback - Early return undefined for null/undefined/non-string inputs - Prevents potential runtime errors from .split() on invalid types - Add tests for invalid input handling Amp-Thread-ID: https://ampcode.com/threads/T-019c0849-5650-7060-b4bd-23ef0c8dfa39 Co-authored-by: Amp <amp@ampcode.com>
## Summary Adds support for creating Chatterbox TTS nodes when clicking Chatterbox models in the Cloud asset browser. ## Changes ### modelToNodeStore.ts - Add `findProvidersWithFallback()` helper for hierarchical model type lookups (e.g., `parent/child` falls back to `parent`) - Register 4 Chatterbox model directories with empty widget keys: - `chatterbox/chatterbox` → `FL_ChatterboxTTS` - `chatterbox/chatterbox_turbo` → `FL_ChatterboxTurboTTS` - `chatterbox/chatterbox_multilingual` → `FL_ChatterboxMultilingualTTS` - `chatterbox/chatterbox_vc` → `FL_ChatterboxVC` ### createModelNodeFromAsset.ts - Skip widget assignment when `provider.key` is empty (for nodes that auto-load models without a widget selector) ### Tests - Add tests for hierarchical fallback behavior - Add tests for empty widget key (auto-load nodes) - Add Chatterbox node types to mock data ## Notes - Empty `key` convention: Chatterbox nodes auto-load their models and don't have a model selector widget, so we register them with `key: ''` and skip the widget assignment step - Hierarchical fallback only goes one level deep (`a/b/c` → `a`, not `a/b`) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8418-feat-add-Chatterbox-model-support-for-Cloud-asset-browser-2f76d73d365081be822bc369b155f099) by [Unito](https://www.unito.io) --------- Co-authored-by: Subagent 5 <subagent@example.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: GitHub Action <action@github.com>
|
@christian-byrne Successfully backported to #8453 |
…set browser (#8453) Backport of #8418 to `cloud/1.38` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8453-backport-cloud-1-38-feat-add-Chatterbox-model-support-for-Cloud-asset-browser-2f86d73d36508158a791f6063485fd3c) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Subagent 5 <subagent@example.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: GitHub Action <action@github.com>
## Summary Adds support for creating Chatterbox TTS nodes when clicking Chatterbox models in the Cloud asset browser. ## Changes ### modelToNodeStore.ts - Add `findProvidersWithFallback()` helper for hierarchical model type lookups (e.g., `parent/child` falls back to `parent`) - Register 4 Chatterbox model directories with empty widget keys: - `chatterbox/chatterbox` → `FL_ChatterboxTTS` - `chatterbox/chatterbox_turbo` → `FL_ChatterboxTurboTTS` - `chatterbox/chatterbox_multilingual` → `FL_ChatterboxMultilingualTTS` - `chatterbox/chatterbox_vc` → `FL_ChatterboxVC` ### createModelNodeFromAsset.ts - Skip widget assignment when `provider.key` is empty (for nodes that auto-load models without a widget selector) ### Tests - Add tests for hierarchical fallback behavior - Add tests for empty widget key (auto-load nodes) - Add Chatterbox node types to mock data ## Notes - Empty `key` convention: Chatterbox nodes auto-load their models and don't have a model selector widget, so we register them with `key: ''` and skip the widget assignment step - Hierarchical fallback only goes one level deep (`a/b/c` → `a`, not `a/b`) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8418-feat-add-Chatterbox-model-support-for-Cloud-asset-browser-2f76d73d365081be822bc369b155f099) by [Unito](https://www.unito.io) --------- Co-authored-by: Subagent 5 <subagent@example.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: GitHub Action <action@github.com>
## Summary Adds support for creating Chatterbox TTS nodes when clicking Chatterbox models in the Cloud asset browser. ## Changes ### modelToNodeStore.ts - Add `findProvidersWithFallback()` helper for hierarchical model type lookups (e.g., `parent/child` falls back to `parent`) - Register 4 Chatterbox model directories with empty widget keys: - `chatterbox/chatterbox` → `FL_ChatterboxTTS` - `chatterbox/chatterbox_turbo` → `FL_ChatterboxTurboTTS` - `chatterbox/chatterbox_multilingual` → `FL_ChatterboxMultilingualTTS` - `chatterbox/chatterbox_vc` → `FL_ChatterboxVC` ### createModelNodeFromAsset.ts - Skip widget assignment when `provider.key` is empty (for nodes that auto-load models without a widget selector) ### Tests - Add tests for hierarchical fallback behavior - Add tests for empty widget key (auto-load nodes) - Add Chatterbox node types to mock data ## Notes - Empty `key` convention: Chatterbox nodes auto-load their models and don't have a model selector widget, so we register them with `key: ''` and skip the widget assignment step - Hierarchical fallback only goes one level deep (`a/b/c` → `a`, not `a/b`) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8418-feat-add-Chatterbox-model-support-for-Cloud-asset-browser-2f76d73d365081be822bc369b155f099) by [Unito](https://www.unito.io) --------- Co-authored-by: Subagent 5 <subagent@example.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: GitHub Action <action@github.com>
## Summary Adds support for creating Chatterbox TTS nodes when clicking Chatterbox models in the Cloud asset browser. ## Changes ### modelToNodeStore.ts - Add `findProvidersWithFallback()` helper for hierarchical model type lookups (e.g., `parent/child` falls back to `parent`) - Register 4 Chatterbox model directories with empty widget keys: - `chatterbox/chatterbox` → `FL_ChatterboxTTS` - `chatterbox/chatterbox_turbo` → `FL_ChatterboxTurboTTS` - `chatterbox/chatterbox_multilingual` → `FL_ChatterboxMultilingualTTS` - `chatterbox/chatterbox_vc` → `FL_ChatterboxVC` ### createModelNodeFromAsset.ts - Skip widget assignment when `provider.key` is empty (for nodes that auto-load models without a widget selector) ### Tests - Add tests for hierarchical fallback behavior - Add tests for empty widget key (auto-load nodes) - Add Chatterbox node types to mock data ## Notes - Empty `key` convention: Chatterbox nodes auto-load their models and don't have a model selector widget, so we register them with `key: ''` and skip the widget assignment step - Hierarchical fallback only goes one level deep (`a/b/c` → `a`, not `a/b`) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8418-feat-add-Chatterbox-model-support-for-Cloud-asset-browser-2f76d73d365081be822bc369b155f099) by [Unito](https://www.unito.io) --------- Co-authored-by: Subagent 5 <subagent@example.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: GitHub Action <action@github.com>
Summary
Adds support for creating Chatterbox TTS nodes when clicking Chatterbox models in the Cloud asset browser.
Changes
modelToNodeStore.ts
findProvidersWithFallback()helper for hierarchical model type lookups (e.g.,parent/childfalls back toparent)chatterbox/chatterbox→FL_ChatterboxTTSchatterbox/chatterbox_turbo→FL_ChatterboxTurboTTSchatterbox/chatterbox_multilingual→FL_ChatterboxMultilingualTTSchatterbox/chatterbox_vc→FL_ChatterboxVCcreateModelNodeFromAsset.ts
provider.keyis empty (for nodes that auto-load models without a widget selector)Tests
Notes
keyconvention: Chatterbox nodes auto-load their models and don't have a model selector widget, so we register them withkey: ''and skip the widget assignment stepa/b/c→a, nota/b)┆Issue is synchronized with this Notion page by Unito