Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,8 +25,10 @@ def load_beat_model():
|
|
| 25 |
|
| 26 |
@st.cache_resource
|
| 27 |
def load_image_model():
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
| 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 |
|