mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-22 21:38:52 +00:00
feat: add model-to-node mappings for new node packs
Add entries to MODEL_NODE_MAPPINGS for model directories that need UI backlinks so the 'Use' button works in the model browser. - background_removal -> LoadBackgroundRemovalModel (ComfyUI core) - frame_interpolation -> FrameInterpolationModelLoader (ComfyUI core) - film -> FILM VFI (ComfyUI-Frame-Interpolation) Each loader was verified against the upstream node's INPUT_TYPES. Test coverage extended in modelToNodeStore.test.ts. ultralytics/bbox and ultralytics/segm intentionally left unmapped to preserve the fix from #12075 (BE-689) — cloud-side asset metadata fixes need to land first.
This commit is contained in:
@@ -197,5 +197,18 @@ export const MODEL_NODE_MAPPINGS: ReadonlyArray<
|
||||
['mediapipe', 'LivePortraitLoadMediaPipeCropper', ''],
|
||||
|
||||
// ---- Superprompt text enhancement ----
|
||||
['superprompt-v1', 'Superprompt', '']
|
||||
['superprompt-v1', 'Superprompt', ''],
|
||||
|
||||
// ---- Background removal (ComfyUI core) ----
|
||||
['background_removal', 'LoadBackgroundRemovalModel', 'bg_removal_name'],
|
||||
|
||||
// ---- Frame interpolation (ComfyUI core) ----
|
||||
['frame_interpolation', 'FrameInterpolationModelLoader', 'model_name'],
|
||||
|
||||
// ---- FILM VFI (ComfyUI-Frame-Interpolation) ----
|
||||
['film', 'FILM VFI', 'ckpt_name']
|
||||
|
||||
// NOTE: ultralytics/bbox + ultralytics/segm intentionally NOT registered
|
||||
// here. Tracked in BE-689 — re-enable only after cloud-side fixes land
|
||||
// (tag lookup + submitted value mismatch). See PR #12075.
|
||||
] as const satisfies ReadonlyArray<readonly [string, string, string]>
|
||||
|
||||
@@ -38,7 +38,10 @@ const EXPECTED_DEFAULT_TYPES = [
|
||||
'segformer_b3_fashion',
|
||||
'nlf',
|
||||
'FlashVSR',
|
||||
'FlashVSR-v1.1'
|
||||
'FlashVSR-v1.1',
|
||||
'background_removal',
|
||||
'frame_interpolation',
|
||||
'film'
|
||||
] as const
|
||||
|
||||
type NodeDefStoreType = ReturnType<typeof useNodeDefStore>
|
||||
@@ -87,7 +90,10 @@ const MOCK_NODE_NAMES = [
|
||||
'IPAdapterModelLoader',
|
||||
'LS_LoadSegformerModel',
|
||||
'LoadNLFModel',
|
||||
'FlashVSRNode'
|
||||
'FlashVSRNode',
|
||||
'LoadBackgroundRemovalModel',
|
||||
'FrameInterpolationModelLoader',
|
||||
'FILM VFI'
|
||||
] as const
|
||||
|
||||
const mockNodeDefsByName = Object.fromEntries(
|
||||
@@ -261,7 +267,10 @@ describe('useModelToNodeStore', () => {
|
||||
['FlashVSR', 'FlashVSRNode', ''],
|
||||
['FlashVSR-v1.1', 'FlashVSRNode', ''],
|
||||
['segformer_b2_clothes', 'LS_LoadSegformerModel', 'model_name'],
|
||||
['segformer_b3_fashion', 'LS_LoadSegformerModel', 'model_name']
|
||||
['segformer_b3_fashion', 'LS_LoadSegformerModel', 'model_name'],
|
||||
['background_removal', 'LoadBackgroundRemovalModel', 'bg_removal_name'],
|
||||
['frame_interpolation', 'FrameInterpolationModelLoader', 'model_name'],
|
||||
['film', 'FILM VFI', 'ckpt_name']
|
||||
])(
|
||||
'should return correct provider for %s',
|
||||
(modelType, expectedNodeName, expectedKey) => {
|
||||
|
||||
Reference in New Issue
Block a user