Use vendored RefMod creator implementation
This commit is contained in:
@@ -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",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user