DonImages commited on
Commit
0364ee7
·
verified ·
1 Parent(s): 82198c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ pipeline = StableDiffusion3Pipeline.from_pretrained(
26
  lora_path = "lora_trained_model.pt" # Ensure this file is uploaded in the Space
27
  if os.path.exists(lora_path):
28
  lora_state_dict = torch.load(lora_path, map_location=device, weights_only=True)
29
- pipeline.load_lora_weights(lora_state_dict) # Load LoRA weights into the pipeline
30
  print("✅ LoRA weights loaded successfully!")
31
  else:
32
  print("⚠️ LoRA file not found! Running base model.")
 
26
  lora_path = "lora_trained_model.pt" # Ensure this file is uploaded in the Space
27
  if os.path.exists(lora_path):
28
  lora_state_dict = torch.load(lora_path, map_location=device, weights_only=True)
29
+ pipeline.load_lora_weights(lora_path) # Load LoRA weights into the pipeline
30
  print("✅ LoRA weights loaded successfully!")
31
  else:
32
  print("⚠️ LoRA file not found! Running base model.")