nimatov commited on
Commit
88b385a
·
verified ·
1 Parent(s): 947e165

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -25,8 +25,10 @@ def load_beat_model():
25
 
26
  @st.cache_resource
27
  def load_image_model():
28
- pipeline = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5",torch_dtype=torch.float16).to("cuda")
29
- # pipeline.load_lora_weights("Weights/pytorch_lora_weights.safetensors", weight_name="pytorch_lora_weights.safetensors")
 
 
30
  return pipeline
31
 
32
 
 
25
 
26
  @st.cache_resource
27
  def load_image_model():
28
+ torch.cuda.empty_cache()
29
+ pipeline = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
30
+ pipeline.to("cuda")
31
+ pipeline.load_lora_weights("Weights/pytorch_lora_weights.safetensors", weight_name="pytorch_lora_weights.safetensors")
32
  return pipeline
33
 
34