Update app.py
Browse files
app.py
CHANGED
|
@@ -382,6 +382,7 @@ def generate_video(
|
|
| 382 |
progress=gr.Progress(track_tqdm=True),
|
| 383 |
):
|
| 384 |
try:
|
|
|
|
| 385 |
torch.cuda.reset_peak_memory_stats()
|
| 386 |
log_memory("start")
|
| 387 |
|
|
@@ -484,7 +485,6 @@ def generate_video(
|
|
| 484 |
try:
|
| 485 |
# Rebuild pipeline object with the new LoRA descriptor
|
| 486 |
# NOTE: this replaces the global `pipeline`. We must declare global to reassign it.
|
| 487 |
-
global pipeline
|
| 488 |
pipeline = LTX23DistilledA2VPipeline(
|
| 489 |
distilled_checkpoint_path=checkpoint_path,
|
| 490 |
spatial_upsampler_path=spatial_upsampler_path,
|
|
|
|
| 382 |
progress=gr.Progress(track_tqdm=True),
|
| 383 |
):
|
| 384 |
try:
|
| 385 |
+
global pipeline # <<< ADD THIS LINE HERE (VERY TOP of try block)
|
| 386 |
torch.cuda.reset_peak_memory_stats()
|
| 387 |
log_memory("start")
|
| 388 |
|
|
|
|
| 485 |
try:
|
| 486 |
# Rebuild pipeline object with the new LoRA descriptor
|
| 487 |
# NOTE: this replaces the global `pipeline`. We must declare global to reassign it.
|
|
|
|
| 488 |
pipeline = LTX23DistilledA2VPipeline(
|
| 489 |
distilled_checkpoint_path=checkpoint_path,
|
| 490 |
spatial_upsampler_path=spatial_upsampler_path,
|