Merge pull request #5 from GiusTex/remove-CFGFloatListScheduler

remove CFGFloatListScheduler
This commit is contained in:
Gius
2026-04-18 20:40:58 +02:00
committed by GitHub
4 changed files with 4 additions and 2717 deletions
+3 -5
View File
@@ -6,19 +6,17 @@ A native comfyui port of Kijai's WanVideo-Wrapper TimeToMove
https://github.com/user-attachments/assets/0b201e7a-d3c6-417f-8293-e20e8d2872fb
### Updates:
- Solved color issue.
- Fixed other bugs.
- Moved `CFGFloatListScheduler` to [ComfyUI-MoreEfficientSamplers](https://github.com/GiusTex/ComfyUI-MoreEfficientSamplers).
### Nodes
The custom node contains 4 new nodes:
The custom node contains 3 new nodes:
- `Encode WanVideo`: taken from wanvideo-wrapper, it encodes the reference video.
- `TTM Latent Add`: taken from wanvideo-wrapper, it embeds in the latent the reference to the driving video.
- `Timove To Move Guider`: this node adds the ttm latent to the latent noise before passing it to the sampling function. This node removes the necessity of a dedicated sampler.
- `CFG Float List Scheduler`: taken from wanvideo-wrapper, it creates a list of cfg values, and submits them step by step, making possible using different cfg values at different steps.
### Other custom nodes used:
- The advanced sampler used in the [second workflow](https://github.com/GiusTex/ComfyUI-Wan-TimeToMove/blob/TTM-v2/wanvideo_2_2_I2V_A14B_TimeToMove_workflow2.json) can be found [here](https://github.com/GiusTex/ComfyUI-MoreEfficientSamplers). You can still use the native comfyui `sampler custom advanced` using [this](https://github.com/GiusTex/ComfyUI-Wan-TimeToMove/blob/TTM-v2/wanvideo_2_2_I2V_A14B_TimeToMove_workflow1.json) workflow.
- The scheduler used is [this](https://github.com/BigStationW/flowmatch_scheduler-comfyui), useful for models using lightx loras. You can still use other samplers/schedulers.
- If you don't have kijai wan-videowrapper and need a cfg scheduler, you can find `CFGFloatListScheduler` here [ComfyUI-MoreEfficientSamplers](https://github.com/GiusTex/ComfyUI-MoreEfficientSamplers).
### Download
To install ComfyUI-Wan-TimeToMove, follow these steps:
+1 -4
View File
@@ -1,20 +1,17 @@
from .nodes import (EncodeWanVideo,
TTMLatentAdd,
TimeToMoveGuider,
CFGFloatListScheduler)
TimeToMoveGuider)
NODE_CLASS_MAPPINGS = {
"EncodeWanVideo": EncodeWanVideo,
"TTMLatentAdd": TTMLatentAdd,
"TimeToMoveGuider": TimeToMoveGuider,
"CFGFloatListScheduler": CFGFloatListScheduler,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"EncodeWanVideo": "Encode WanVideo",
"TTMLatentAdd": "TTM Latent Add",
"TimeToMoveGuider": "TimeToMove Guider",
"CFGFloatListScheduler": "CFGFloatListScheduler",
}
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
-55
View File
@@ -130,58 +130,3 @@ class TimeToMoveGuider:
guider.set_ttm_options(ttm_options)
return (guider,)
# Taken from kijai WanVideo-Wrapper
class CFGFloatListScheduler:
@classmethod
def INPUT_TYPES(s):
return {"required": {
"steps": ("INT", {"default": 30, "min": 2, "max": 1000, "step": 1, "tooltip": "Number of steps to schedule cfg for"} ),
"cfg_scale_start": ("FLOAT", {"default": 5.0, "min": 0.0, "max": 30.0, "step": 0.01, "round": 0.01, "tooltip": "CFG scale to use for the steps"}),
"cfg_scale_end": ("FLOAT", {"default": 5.0, "min": 0.0, "max": 30.0, "step": 0.01, "round": 0.01, "tooltip": "CFG scale to use for the steps"}),
"interpolation": (["linear", "ease_in", "ease_out"], {"default": "linear", "tooltip": "Interpolation method to use for the cfg scale"}),
"start_percent": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.01, "round": 0.01,"tooltip": "Start percent of the steps to apply cfg"}),
"end_percent": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01, "round": 0.01,"tooltip": "End percent of the steps to apply cfg"}),
},
"hidden": {
"unique_id": "UNIQUE_ID",
},
}
RETURN_TYPES = ("FLOAT", )
RETURN_NAMES = ("float_list",)
FUNCTION = "process"
CATEGORY = "Wan22 TimeToMove"
DESCRIPTION = "Helper node to generate a list of floats that can be used to schedule cfg scale for the steps, outside the set range cfg is set to 1.0. Taken from Kijai WanVideo-Wrapper"
def process(self, steps, cfg_scale_start, cfg_scale_end, interpolation, start_percent, end_percent, unique_id):
# Create a list of floats for the cfg schedule
cfg_list = [1.0] * steps
start_idx = min(int(steps * start_percent), steps - 1)
end_idx = min(int(steps * end_percent), steps - 1)
for i in range(start_idx, end_idx + 1):
if i >= steps:
break
if end_idx == start_idx:
t = 0
else:
t = (i - start_idx) / (end_idx - start_idx)
if interpolation == "linear":
factor = t
elif interpolation == "ease_in":
factor = t * t
elif interpolation == "ease_out":
factor = t * (2 - t)
cfg_list[i] = round(cfg_scale_start + factor * (cfg_scale_end - cfg_scale_start), 2)
# If start_percent > 0, always include the first step
if start_percent > 0:
cfg_list[0] = 1.0
return (cfg_list,)
File diff suppressed because it is too large Load Diff