From 11b0b11376ad2e04458bf549e6d713d19e786f52 Mon Sep 17 00:00:00 2001 From: Chris Dumas Date: Tue, 20 Oct 2026 13:45:07 +0000 Subject: [PATCH] Use vendored RefMod creator implementation --- README.md | 8 -------- dumas_h3_refmod_nodes.py | 30 ----------------------------- tests/test_dumas_h3_refmod_nodes.py | 21 -------------------- 3 files changed, 59 deletions(-) diff --git a/README.md b/README.md index c6bd5f8..0a8beb4 100644 --- a/README.md +++ b/README.md @@ -117,14 +117,6 @@ roots for the current ComfyUI process so the DUMAS picker can discover them. For persistence across restarts, add the folder to ComfyUI's `refmods` mapping in `extra_model_paths.yaml`. -### DUMAS H3 RefMod Create - -`DUMAS H3 RefMod Create (upstream)` is a DUMAS-labelled compatibility entry -for the maintained `ComfyUI-MiniMaxH3Mod` creator. It delegates to that pack's -current implementation, so new extraction modes, masks, folder bundles, and -token-budget improvements remain available without creating a stale DUMAS fork. -The maintained MiniMax H3 RefMod pack must still be installed and loaded. - ### DUMAS H3 RefMod Visual Picker `DUMAS H3 RefMod Visual Picker` provides a small browser button for selecting diff --git a/dumas_h3_refmod_nodes.py b/dumas_h3_refmod_nodes.py index 85592b0..45e7fae 100644 --- a/dumas_h3_refmod_nodes.py +++ b/dumas_h3_refmod_nodes.py @@ -85,34 +85,6 @@ def _continuum_reference_bundle_type(): ) -def _upstream_refmod_creator_type(): - """Find the maintained creator already loaded by ComfyUI.""" - for module in list(sys.modules.values()): - creator = getattr(module, "MiniMaxH3RefModExtract", None) if module is not None else None - if creator is not None and hasattr(creator, "define_schema") and hasattr(creator, "execute"): - return creator - raise RuntimeError( - "DUMAS H3 RefMod Create requires the maintained " - "ComfyUI-MiniMaxH3Mod pack to be installed and loaded." - ) - - -class DumasH3RefModCreate: - """DUMAS-labelled compatibility entry for the maintained RefMod creator. - - The extraction implementation remains upstream-owned so improvements to - modes, masks, folder bundles, and token budgeting are not forked here. - """ - - @classmethod - def define_schema(cls): - return _upstream_refmod_creator_type().define_schema() - - @classmethod - def execute(cls, *args, **kwargs): - return _upstream_refmod_creator_type().execute(*args, **kwargs) - - def _decode_refmod_image(video_vae, mod): if torch is None: raise RuntimeError("DUMAS RefMod-to-Continuum requires PyTorch/ComfyUI.") @@ -343,13 +315,11 @@ class DumasH3RefModsToContinuum: NODE_CLASS_MAPPINGS = { - "DumasH3RefModCreate": DumasH3RefModCreate, "DumasH3RefModSave": DumasH3RefModSave, "DumasH3RefModsToContinuum": DumasH3RefModsToContinuum, } NODE_DISPLAY_NAME_MAPPINGS = { - "DumasH3RefModCreate": "DUMAS H3 RefMod Create (upstream)", "DumasH3RefModSave": "DUMAS H3 RefMod Save", "DumasH3RefModsToContinuum": "DUMAS H3 RefMods to Continuum", } diff --git a/tests/test_dumas_h3_refmod_nodes.py b/tests/test_dumas_h3_refmod_nodes.py index 7913fb1..7b227ad 100644 --- a/tests/test_dumas_h3_refmod_nodes.py +++ b/tests/test_dumas_h3_refmod_nodes.py @@ -78,27 +78,6 @@ class DumasRefModSaveTests(unittest.TestCase): with self.assertRaisesRegex(ValueError, "input_folder"): node.save([ (FakeMod("hero"), 1.0) ], save_location="Input folder") - def test_creator_entry_delegates_to_loaded_upstream_class(self): - upstream = types.ModuleType("fake_minimax_refmod_nodes") - - class Creator: - @classmethod - def define_schema(cls): - return "schema" - - @classmethod - def execute(cls, *args, **kwargs): - return (args, kwargs) - - upstream.MiniMaxH3RefModExtract = Creator - sys.modules[upstream.__name__] = upstream - try: - node = self.module.DumasH3RefModCreate - self.assertEqual(node.define_schema(), "schema") - self.assertEqual(node.execute("x", name="hero")[1]["name"], "hero") - finally: - sys.modules.pop(upstream.__name__, None) - @unittest.skipUnless(torch is not None, "PyTorch is only available in the ComfyUI runtime") def test_refmods_to_continuum_decodes_and_routes_prompt_tags(self): bundle_module = types.SimpleNamespace(