XiangpengYang commited on
Commit
ae74727
·
1 Parent(s): 31189f6

new lora path

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -275,15 +275,16 @@ def ui(GPU_memory_mode, scheduler_dict, config_path, compile_dit, weight_dtype):
275
 
276
  # Use snapshot download for the VideoCoF repo to get all weights (including safetensors)
277
  try:
278
- from huggingface_hub import snapshot_download
279
  print("Downloading Wan2.1-T2V-14B weights...")
280
  snapshot_download(repo_id="Wan-AI/Wan2.1-T2V-14B", local_dir="Wan-AI/Wan2.1-T2V-14B")
281
  print("Downloading VideoCoF weights...")
282
- snapshot_download(repo_id="XiangpengYang/VideoCoF")
 
283
  except Exception as e:
284
  print(f"Warning: Failed to pre-download weights: {e}")
285
 
286
- base_model_dropdown, lora_model_dropdown, lora_alpha_slider, _ = create_finetune_models_checkpoints(controller, visible=False, default_lora="XiangpengYang/VideoCoF")
287
 
288
  # Set default LoRA alpha to 1.0 (matching inference.py)
289
  lora_alpha_slider.value = 1.0
 
275
 
276
  # Use snapshot download for the VideoCoF repo to get all weights (including safetensors)
277
  try:
278
+ from huggingface_hub import snapshot_download, hf_hub_download
279
  print("Downloading Wan2.1-T2V-14B weights...")
280
  snapshot_download(repo_id="Wan-AI/Wan2.1-T2V-14B", local_dir="Wan-AI/Wan2.1-T2V-14B")
281
  print("Downloading VideoCoF weights...")
282
+ os.makedirs("models/Personalized_Model", exist_ok=True)
283
+ hf_hub_download(repo_id="XiangpengYang/VideoCoF", filename="videocof.safetensors", local_dir="models/Personalized_Model")
284
  except Exception as e:
285
  print(f"Warning: Failed to pre-download weights: {e}")
286
 
287
+ base_model_dropdown, lora_model_dropdown, lora_alpha_slider, _ = create_finetune_models_checkpoints(controller, visible=False, default_lora="videocof.safetensors")
288
 
289
  # Set default LoRA alpha to 1.0 (matching inference.py)
290
  lora_alpha_slider.value = 1.0