From e80ec6e3d47ca8bc87de377e27d31bcc62fad721 Mon Sep 17 00:00:00 2001 From: Deep Mehta <42841935+deepme987@users.noreply.github.com> Date: Wed, 20 May 2026 16:26:40 -0700 Subject: [PATCH] feat: add model-to-node mappings for geometry_estimation and optical_flow (#12389) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Add entries to `MODEL_NODE_MAPPINGS` so the model browser's "Use" button creates the correct loader node for two model directories introduced in recent node-pack updates. ## Changes - **What**: 2 new entries in `src/platform/assets/mappings/modelNodeMappings.ts`: - `geometry_estimation` → `LoadMoGeModel` / `model_name` - `optical_flow` → `OpticalFlowLoader` / `model_name` - **Breaking**: none ## Review Focus - Node class names and input keys cross-checked against the published node definitions: - `LoadMoGeModel` is the MoGe geometry-estimation loader (companion nodes: `MoGeInference`, `MoGeRender`, `MoGeContextStrandModel`) - `OpticalFlowLoader` is the RAFT optical-flow loader - Both directories accept a single model file via a COMBO widget on the loader node ## Test plan - [ ] Verify "Use" button works for each new model directory in the model browser: - One `geometry_estimation` model (e.g. `moge_2_vitl_normal_fp16.safetensors`) → creates a `LoadMoGeModel` node with the file preselected - One `optical_flow` model → creates an `OpticalFlowLoader` node with the file preselected ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-12389-feat-add-model-to-node-mappings-for-geometry_estimation-and-optical_flow-3666d73d36508190981fcaf77f9d2ee4) by [Unito](https://www.unito.io) --- src/platform/assets/mappings/modelNodeMappings.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/platform/assets/mappings/modelNodeMappings.ts b/src/platform/assets/mappings/modelNodeMappings.ts index 9ce9da8667..e1c3e20992 100644 --- a/src/platform/assets/mappings/modelNodeMappings.ts +++ b/src/platform/assets/mappings/modelNodeMappings.ts @@ -210,5 +210,11 @@ export const MODEL_NODE_MAPPINGS: ReadonlyArray< // ---- Ultralytics YOLO detectors (ComfyUI-Impact-Pack) ---- ['ultralytics/bbox', 'UltralyticsDetectorProvider', 'model_name'], - ['ultralytics/segm', 'UltralyticsDetectorProvider', 'model_name'] + ['ultralytics/segm', 'UltralyticsDetectorProvider', 'model_name'], + + // ---- ComfyUI core geometry estimation (MoGe) ---- + ['geometry_estimation', 'LoadMoGeModel', 'model_name'], + + // ---- ComfyUI core optical flow (RAFT) ---- + ['optical_flow', 'OpticalFlowLoader', 'model_name'] ] as const satisfies ReadonlyArray