diff --git a/nodes_utility.py b/nodes_utility.py index 5a12804..f137fb5 100644 --- a/nodes_utility.py +++ b/nodes_utility.py @@ -228,15 +228,40 @@ class CreateCFGScheduleFloatList: return (cfg_list,) + +class DummyComfyWanModelObject: + @classmethod + def INPUT_TYPES(s): + return {"required": { + } + } + + RETURN_TYPES = ("MODEL", ) + RETURN_NAMES = ("model",) + FUNCTION = "create" + CATEGORY = "WanVideoWrapper" + DESCRIPTION = "Helper node to create empty Wan model to use with BasicScheduler -node to get sigmas" + + def create(self): + from comfy.model_sampling import ModelSamplingDiscreteFlow + class DummyModel: + def get_model_object(self, name): + if name == "model_sampling": + return ModelSamplingDiscreteFlow() + return None + return (DummyModel(),) + NODE_CLASS_MAPPINGS = { "WanVideoImageResizeToClosest": WanVideoImageResizeToClosest, "WanVideoVACEStartToEndFrame": WanVideoVACEStartToEndFrame, "ExtractStartFramesForContinuations": ExtractStartFramesForContinuations, - "CreateCFGScheduleFloatList": CreateCFGScheduleFloatList + "CreateCFGScheduleFloatList": CreateCFGScheduleFloatList, + "DummyComfyWanModelObject": DummyComfyWanModelObject } NODE_DISPLAY_NAME_MAPPINGS = { "WanVideoImageResizeToClosest": "WanVideo Image Resize To Closest", "WanVideoVACEStartToEndFrame": "WanVideo VACE Start To End Frame", "ExtractStartFramesForContinuations": "Extract Start Frames For Continuations", - "CreateCFGScheduleFloatList": "Create CFG Schedule Float List" + "CreateCFGScheduleFloatList": "Create CFG Schedule Float List", + "DummyComfyWanModelObject": "Dummy Comfy Wan Model Object" } \ No newline at end of file