feat: add model-to-node mappings for cloud asset categories (#8468)

## Summary

Add mappings for 13 previously unmapped model categories in the Cloud
asset browser, enabling users to click on models to create corresponding
loader nodes on the canvas.

## Changes

### Core nodes
- `latent_upscale_models` → `LatentUpscaleModelLoader`

### Extension nodes
| Category | Node Class | Widget Key |
|----------|-----------|-----------|
| `sam2` | `DownloadAndLoadSAM2Model` | `model` |
| `sams` | `SAMLoader` | `model_name` |
| `ultralytics` | `UltralyticsDetectorProvider` | `model_name` |
| `depthanything` | `DownloadAndLoadDepthAnythingV2Model` | `model` |
| `ipadapter` | `IPAdapterModelLoader` | `ipadapter_file` |
| `segformer_b2_clothes` | `LS_LoadSegformerModel` | `model_name` |
| `segformer_b3_clothes` | `LS_LoadSegformerModel` | `model_name` |
| `segformer_b3_fashion` | `LS_LoadSegformerModel` | `model_name` |
| `nlf` | `LoadNLFModel` | `nlf_model` |
| `FlashVSR` | `FlashVSRNode` | (auto-load) |
| `FlashVSR-v1.1` | `FlashVSRNode` | (auto-load) |

### Hierarchical fallback
- `ultralytics/bbox` and `ultralytics/segm` fall back to the
`ultralytics` mapping

### Skipped categories
- `vae_approx` - No user-facing loader (used internally for latent
previews)
- `detection` - No specific loader exists

## Testing
- Added unit tests for all new mappings
- Tests verify hierarchical fallback works correctly
- All 40 tests pass

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8468-feat-add-model-to-node-mappings-for-cloud-asset-categories-2f86d73d365081389ea5fbfc52ecbfad)
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>
This commit is contained in:
Christian Byrne
2026-02-06 16:04:27 -08:00
committed by GitHub
parent 5441f70cd5
commit f53b0879ed
2 changed files with 135 additions and 2 deletions

View File

@@ -192,6 +192,44 @@ export const useModelToNodeStore = defineStore('modelToNode', () => {
''
)
quickRegister('chatterbox/chatterbox_vc', 'FL_ChatterboxVC', '')
// Latent upscale models (ComfyUI core - nodes_hunyuan.py)
quickRegister(
'latent_upscale_models',
'LatentUpscaleModelLoader',
'model_name'
)
// SAM/SAM2 segmentation models (comfyui-segment-anything-2, comfyui-impact-pack)
quickRegister('sam2', 'DownloadAndLoadSAM2Model', 'model')
quickRegister('sams', 'SAMLoader', 'model_name')
// Ultralytics detection models (comfyui-impact-subpack)
// Note: ultralytics/bbox and ultralytics/segm fall back to this via hierarchical lookup
quickRegister('ultralytics', 'UltralyticsDetectorProvider', 'model_name')
// DepthAnything models (comfyui-depthanythingv2)
quickRegister(
'depthanything',
'DownloadAndLoadDepthAnythingV2Model',
'model'
)
// IP-Adapter models (comfyui_ipadapter_plus)
quickRegister('ipadapter', 'IPAdapterModelLoader', 'ipadapter_file')
// Segformer clothing/fashion segmentation models (comfyui_layerstyle)
quickRegister('segformer_b2_clothes', 'LS_LoadSegformerModel', 'model_name')
quickRegister('segformer_b3_clothes', 'LS_LoadSegformerModel', 'model_name')
quickRegister('segformer_b3_fashion', 'LS_LoadSegformerModel', 'model_name')
// NLF pose estimation models (ComfyUI-WanVideoWrapper)
quickRegister('nlf', 'LoadNLFModel', 'nlf_model')
// FlashVSR video super-resolution (ComfyUI-FlashVSR_Ultra_Fast)
// Empty key means the node auto-loads models without a widget selector
quickRegister('FlashVSR', 'FlashVSRNode', '')
quickRegister('FlashVSR-v1.1', 'FlashVSRNode', '')
}
return {