Added missing requirements

This commit is contained in:
DeepBeepMeep 2025-04-09 22:11:04 +02:00
parent 016e57c253
commit eba935515a
2 changed files with 10 additions and 4 deletions

View File

@ -22,4 +22,5 @@ mutagen
decord
onnxruntime-gpu
rembg[gpu]==2.0.65
matplotlib
# rembg==2.0.65

11
wgp.py
View File

@ -173,8 +173,13 @@ def process_prompt_and_add_tasks(state, model_choice):
return
else:
video_mask = None
if "O" in video_prompt_type and inputs["max_frames"]==0:
gr.Info(f"In order to extend a video, you need to indicate how many frames you want to reuse in the source video.")
if "O" in video_prompt_type :
max_frames= inputs["max_frames"]
video_length = inputs["video_length"]
if max_frames ==0:
gr.Info(f"Warning : you have asked to reuse all the frames of the control Video before extending it. Please make sure the number of frames of the control Video is lower than the total number of frames to generate otherwise it won't make a difference.")
elif max_frames >= video_length:
gr.Info(f"The number of frames in the control Video to reuse ({max_frames}) before extending the Video can not be bigger than the total number of frames ({video_length}) to generate.")
return
if isinstance(image_refs, list):
@ -2060,7 +2065,7 @@ def generate_video(
# gr.Info("Unable to generate a Video while a new configuration is being applied.")
# return
if "P" in preload_model_policy:
if "P" in preload_model_policy and not "U" in preload_model_policy:
while wan_model == None:
time.sleep(1)