Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ pipeline = StableDiffusion3Pipeline.from_pretrained(
|
|
36 |
# Load the LoRA trained weights
|
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)
|
40 |
pipeline.load_lora_weights(lora_state_dict)
|
41 |
print("✅ LoRA weights loaded successfully!")
|
42 |
else:
|
|
|
36 |
# Load the LoRA trained weights
|
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:
|