Spaces:
Running
Running
gc
Browse files
app.py
CHANGED
|
@@ -22,6 +22,7 @@ import numpy as np
|
|
| 22 |
import random
|
| 23 |
import time
|
| 24 |
import math
|
|
|
|
| 25 |
# 20250506 pftq: Added for video input loading
|
| 26 |
import decord
|
| 27 |
# 20250506 pftq: Added for progress bars in video_encode
|
|
@@ -1352,6 +1353,7 @@ def process(input_image,
|
|
| 1352 |
|
| 1353 |
yield gr.update(label="Previewed Frames"), None, '', '', gr.update(interactive=False), gr.update(interactive=True), gr.skip()
|
| 1354 |
|
|
|
|
| 1355 |
yield from process_on_gpu(input_image,
|
| 1356 |
end_image,
|
| 1357 |
image_position,
|
|
@@ -1456,6 +1458,7 @@ def process_video(input_video, end_frame, end_stillness, prompt, n_prompt, rando
|
|
| 1456 |
if cfg > 1:
|
| 1457 |
gs = 1
|
| 1458 |
|
|
|
|
| 1459 |
yield from process_video_on_gpu(input_video, end_frame, end_stillness, prompt, n_prompt, seed, batch, resolution, total_second_length, allocation_time, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch)
|
| 1460 |
|
| 1461 |
def end_process():
|
|
|
|
| 22 |
import random
|
| 23 |
import time
|
| 24 |
import math
|
| 25 |
+
import gc
|
| 26 |
# 20250506 pftq: Added for video input loading
|
| 27 |
import decord
|
| 28 |
# 20250506 pftq: Added for progress bars in video_encode
|
|
|
|
| 1353 |
|
| 1354 |
yield gr.update(label="Previewed Frames"), None, '', '', gr.update(interactive=False), gr.update(interactive=True), gr.skip()
|
| 1355 |
|
| 1356 |
+
gc.collect()
|
| 1357 |
yield from process_on_gpu(input_image,
|
| 1358 |
end_image,
|
| 1359 |
image_position,
|
|
|
|
| 1458 |
if cfg > 1:
|
| 1459 |
gs = 1
|
| 1460 |
|
| 1461 |
+
gc.collect()
|
| 1462 |
yield from process_video_on_gpu(input_video, end_frame, end_stillness, prompt, n_prompt, seed, batch, resolution, total_second_length, allocation_time, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch)
|
| 1463 |
|
| 1464 |
def end_process():
|