Update app.py
Browse files
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.
|
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.")
|