fixed memory leak

This commit is contained in:
deepbeepmeep 2025-08-30 11:56:18 +02:00
parent 9e0354e14f
commit 336e941183
3 changed files with 3 additions and 4 deletions

View File

@ -20,7 +20,7 @@ WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models
**Follow DeepBeepMeep on Twitter/X to get the Latest News**: https://x.com/deepbeepmeep
## 🔥 Latest Updates :
### August 29 2025: WanGP v8.2 - Here Goes Your Weekend
### August 29 2025: WanGP v8.21 - Here Goes Your Weekend
- **InfiniteTalk Video to Video**: this feature can be used for Video Dubbing. Keep in mind that it is a *Sparse Video to Video*, that is internally only image is used by Sliding Window. However thanks to the new *Smooth Transition* mode, each new clip is connected to the previous and all the camera work is done by InfiniteTalk. If you dont get any transition, increase the number of frames of a Sliding Window (81 frames recommended)

View File

@ -778,13 +778,11 @@ class WanAny2V:
from preprocessing.face_preprocessor import FaceProcessor
standin_ref_pos = 1 if "K" in video_prompt_type else 0
if len(original_input_ref_images) < standin_ref_pos + 1:
if "I" in video_prompt_type:
if "I" in video_prompt_type and model_type in ["vace_standin_14B"]:
print("Warning: Missing Standin ref image, make sure 'Inject only People / Objets' is selected or if there is 'Landscape and then People or Objects' there are at least two ref images.")
else:
standin_ref_pos = -1
image_ref = original_input_ref_images[standin_ref_pos]
image_ref.save("si.png")
# face_processor = FaceProcessor(antelopv2_path="ckpts/antelopev2")
face_processor = FaceProcessor()
standin_ref = face_processor.process(image_ref, remove_bg = model_type in ["vace_standin_14B"])
face_processor = None

1
wgp.py
View File

@ -81,6 +81,7 @@ def clear_gen_cache():
def release_model():
global wan_model, offloadobj, reload_needed
wan_model = None
clear_gen_cache()
offload.shared_state
if offloadobj is not None: