DonImages commited on
Commit
24d7276
·
verified ·
1 Parent(s): 2d58f33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -24,8 +24,9 @@ lora_model_path = "./lora_model.pth" # Assuming the file is saved locally
24
 
25
  # Custom method to load and apply LoRA weights to the Stable Diffusion pipeline
26
  def load_lora_model(pipe, lora_model_path):
27
- # Load the LoRA weights
28
- lora_weights = torch.load(lora_model_path, map_location=pipe.device) # Load LoRA model to the correct device
 
29
 
30
  # Print available attributes of the model to check access to `unet` (optional)
31
  print(dir(pipe)) # This will list all attributes and methods of the `pipe` object
 
24
 
25
  # Custom method to load and apply LoRA weights to the Stable Diffusion pipeline
26
  def load_lora_model(pipe, lora_model_path):
27
+ # When loading the LoRA weights
28
+ lora_weights = torch.load(lora_model_path, map_location=device, weights_only=True)
29
+
30
 
31
  # Print available attributes of the model to check access to `unet` (optional)
32
  print(dir(pipe)) # This will list all attributes and methods of the `pipe` object