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