DeepBeepMeep
commited on
Commit
·
0b07b67
1
Parent(s):
197c1dd
Added missing requirements
Browse files- requirements.txt +1 -0
- wgp.py +9 -4
requirements.txt
CHANGED
|
@@ -22,4 +22,5 @@ mutagen
|
|
| 22 |
decord
|
| 23 |
onnxruntime-gpu
|
| 24 |
rembg[gpu]==2.0.65
|
|
|
|
| 25 |
# rembg==2.0.65
|
|
|
|
| 22 |
decord
|
| 23 |
onnxruntime-gpu
|
| 24 |
rembg[gpu]==2.0.65
|
| 25 |
+
matplotlib
|
| 26 |
# rembg==2.0.65
|
wgp.py
CHANGED
|
@@ -173,9 +173,14 @@ def process_prompt_and_add_tasks(state, model_choice):
|
|
| 173 |
return
|
| 174 |
else:
|
| 175 |
video_mask = None
|
| 176 |
-
if "O" in video_prompt_type
|
| 177 |
-
|
| 178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
|
| 180 |
if isinstance(image_refs, list):
|
| 181 |
image_refs = [ convert_image(tup[0]) for tup in image_refs ]
|
|
@@ -2060,7 +2065,7 @@ def generate_video(
|
|
| 2060 |
# gr.Info("Unable to generate a Video while a new configuration is being applied.")
|
| 2061 |
# return
|
| 2062 |
|
| 2063 |
-
if "P" in preload_model_policy:
|
| 2064 |
while wan_model == None:
|
| 2065 |
time.sleep(1)
|
| 2066 |
|
|
|
|
| 173 |
return
|
| 174 |
else:
|
| 175 |
video_mask = None
|
| 176 |
+
if "O" in video_prompt_type :
|
| 177 |
+
max_frames= inputs["max_frames"]
|
| 178 |
+
video_length = inputs["video_length"]
|
| 179 |
+
if max_frames ==0:
|
| 180 |
+
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.")
|
| 181 |
+
elif max_frames >= video_length:
|
| 182 |
+
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.")
|
| 183 |
+
return
|
| 184 |
|
| 185 |
if isinstance(image_refs, list):
|
| 186 |
image_refs = [ convert_image(tup[0]) for tup in image_refs ]
|
|
|
|
| 2065 |
# gr.Info("Unable to generate a Video while a new configuration is being applied.")
|
| 2066 |
# return
|
| 2067 |
|
| 2068 |
+
if "P" in preload_model_policy and not "U" in preload_model_policy:
|
| 2069 |
while wan_model == None:
|
| 2070 |
time.sleep(1)
|
| 2071 |
|