DonImages commited on
Commit
7733840
·
verified ·
1 Parent(s): b55ec53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ pipeline = StableDiffusion3Pipeline.from_pretrained(
37
  lora_path = "lora_trained_model.pt" # Ensure this file is uploaded in the Space
38
  if os.path.exists(lora_path):
39
  lora_state_dict = torch.load(lora_path, map_location=device, weights_only=True)
40
- pipeline.load_lora_weights(lora_state_dict)
41
  print("✅ LoRA weights loaded successfully!")
42
  else:
43
  print("⚠️ LoRA file not found! Running base model.")
 
37
  lora_path = "lora_trained_model.pt" # Ensure this file is uploaded in the Space
38
  if os.path.exists(lora_path):
39
  lora_state_dict = torch.load(lora_path, map_location=device, weights_only=True)
40
+ pipeline = PeftModel.from_pretrained(pipeline, lora_path)
41
  print("✅ LoRA weights loaded successfully!")
42
  else:
43
  print("⚠️ LoRA file not found! Running base model.")