multimodalart HF Staff commited on
Commit
78f540b
Β·
verified Β·
1 Parent(s): eb3174c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -102,12 +102,12 @@ def calculate_dimensions(width, height):
102
 
103
  @spaces.GPU(duration=120)
104
  def generate_video(prompt, first_image_path, last_image_path, duration_seconds):
105
- model_management.load_models_gpu(valid_models)
106
  # Create a temporary directory for resized images
107
  temp_dir = f"temp_resized_{uuid.uuid4().hex}"
108
  os.makedirs(temp_dir, exist_ok=True)
109
 
110
  with torch.inference_mode():
 
111
  # --- Python Image Preprocessing using Pillow ---
112
  print("Preprocessing images with Pillow...")
113
  with Image.open(first_image_path) as img:
 
102
 
103
  @spaces.GPU(duration=120)
104
  def generate_video(prompt, first_image_path, last_image_path, duration_seconds):
 
105
  # Create a temporary directory for resized images
106
  temp_dir = f"temp_resized_{uuid.uuid4().hex}"
107
  os.makedirs(temp_dir, exist_ok=True)
108
 
109
  with torch.inference_mode():
110
+ model_management.load_models_gpu(valid_models)
111
  # --- Python Image Preprocessing using Pillow ---
112
  print("Preprocessing images with Pillow...")
113
  with Image.open(first_image_path) as img: