From ca72029e540a61b38adcaef4eb8f795f767e4375 Mon Sep 17 00:00:00 2001 From: Glary-Bot Date: Mon, 11 May 2026 18:12:10 +0000 Subject: [PATCH] feat: add model-to-node mappings for new node packs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/platform/assets/mappings/modelNodeMappings.ts | 15 ++++++++++++++- src/stores/modelToNodeStore.test.ts | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/platform/assets/mappings/modelNodeMappings.ts b/src/platform/assets/mappings/modelNodeMappings.ts index 0368c7ca52..8e7c599795 100644 --- a/src/platform/assets/mappings/modelNodeMappings.ts +++ b/src/platform/assets/mappings/modelNodeMappings.ts @@ -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 diff --git a/src/stores/modelToNodeStore.test.ts b/src/stores/modelToNodeStore.test.ts index 0af45fca80..986f03b185 100644 --- a/src/stores/modelToNodeStore.test.ts +++ b/src/stores/modelToNodeStore.test.ts @@ -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 @@ -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) => {