From 351d04f690616fcd29518031d021901cc4b78bdd Mon Sep 17 00:00:00 2001 From: jakechai Date: Wed, 15 Oct 2025 15:01:13 +0800 Subject: [PATCH] v2.1.7 1. Fix Loop Frame count calculation bug in SceneCuts Node. --- README.md | 4 ++++ nodes/jake_upgrade.py | 5 ++++- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fbb2e7a..8d9fa00 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,9 @@ If you like what I share, please support me with [PayPal](https://paypal.me/jake 3. Deprecate Hy3D Cam Config 20to21 JK🐉 node. 4. Fixed INT and Float min | max value for Math nodes. +- 2025-10-15 - v2.1.7 +1. Fix Loop Frame count calculation bug in SceneCuts Node. + ## Installation 1. `git clone https://github.com/jakechai/ComfyUI-JakeUpgrade` into the `custom_nodes` folder - e.g. `custom_nodes\ComfyUI-JakeUpgrade` @@ -394,6 +397,7 @@ If you like what I share, please support me with [PayPal](https://paypal.me/jake | Fantasy Talking [2.1](https://github.com/Fantasy-AMAP/fantasy-talking) | module model | ff2v v2v | | Multi Talk [2.1](https://github.com/MeiGen-AI/MultiTalk) | module model | ff2v v2v | | Infinite Talk [2.1](https://github.com/MeiGen-AI/InfiniteTalk) | module model | ff2v v2v | +| Ovi [2.2](https://github.com/character-ai/Ovi) | main model | t2av i2av | | Fantasy Portrait [2.1](https://github.com/Fantasy-AMAP/fantasy-portrait) | module model | ff2v v2v | | MTV Crafter [2.1](https://github.com/DINGYANB/MTVCrafter) | main & module model | t2v ff2v | | *control* | | | diff --git a/nodes/jake_upgrade.py b/nodes/jake_upgrade.py index fed6203..73b0438 100644 --- a/nodes/jake_upgrade.py +++ b/nodes/jake_upgrade.py @@ -1571,7 +1571,10 @@ class SceneCuts_JK: if not long_vid_method: loop_frame_count = int(math.ceil(max(0, (duration * fps - 1)) / 4) * 4 + 1) else: - loop_frame_count = int(segment_frame_count + math.floor((duration * fps - segment_frame_count) / (segment_frame_count - overlap_frame_count)) * (segment_frame_count - overlap_frame_count) + math.ceil(max(0, ((duration * fps - segment_frame_count) % (segment_frame_count - overlap_frame_count) - 1)) / 4) * 4 + 1) + if (duration * fps - segment_frame_count) > 0: + loop_frame_count = int(segment_frame_count + math.floor((duration * fps - segment_frame_count) / (segment_frame_count - overlap_frame_count)) * (segment_frame_count - overlap_frame_count) + math.ceil(max(0, ((duration * fps - segment_frame_count) % (segment_frame_count - overlap_frame_count) - 1)) / 4) * 4 + 1) + else: + loop_frame_count = int(math.ceil(max(0, (duration * fps - 1)) / 4) * 4 + 1) cut_frame_count = max(0, int(round(duration * fps)) - warmup_frame_count) diff --git a/pyproject.toml b/pyproject.toml index de6be6e..ceae091 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-jakeupgrade" description = "ComfyUI workflow customization by Jake." -version = "2.1.6" +version = "2.1.7" license = {file = "LICENSE"} dependencies = ["opencv-python", "piexif", "torch", "numpy", "numexpr", "simpleeval"]