Spaces:
Runtime error
Runtime error
Update gradio_app.py
Browse files- gradio_app.py +7 -0
gradio_app.py
CHANGED
|
@@ -191,6 +191,13 @@ def get_image(image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, i
|
|
| 191 |
cn_videos.append(cn_video)
|
| 192 |
|
| 193 |
cn_videos = torch.cat(cn_videos, dim=2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
model_list = []
|
| 195 |
for model in model_list:
|
| 196 |
model.control_scale = control_scale
|
|
|
|
| 191 |
cn_videos.append(cn_video)
|
| 192 |
|
| 193 |
cn_videos = torch.cat(cn_videos, dim=2)
|
| 194 |
+
if cn_videos.shape[2] > frames:
|
| 195 |
+
idxs = []
|
| 196 |
+
for i in range(y):
|
| 197 |
+
index = int((i + 0.5) * cn.shape[2] / frames)
|
| 198 |
+
idxs.append(min(index, x - 1))
|
| 199 |
+
cn_videos = cn_videos[:, :, idxs, :, :]
|
| 200 |
+
print("cn_videos.shape after slicing", cn_videos.shape)
|
| 201 |
model_list = []
|
| 202 |
for model in model_list:
|
| 203 |
model.control_scale = control_scale
|