Spaces:
Paused
Paused
Uncommented load image model function
Browse files
app.py
CHANGED
@@ -22,11 +22,11 @@ def load_beat_model():
|
|
22 |
beat_service = _Beat_tracking_service()
|
23 |
return beat_service
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
|
31 |
|
32 |
if 'emotion' not in st.session_state:
|
|
|
22 |
beat_service = _Beat_tracking_service()
|
23 |
return beat_service
|
24 |
|
25 |
+
@st.cache_resource
|
26 |
+
def load_image_model():
|
27 |
+
pipeline = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5",torch_dtype=torch.float16).to("cuda")
|
28 |
+
pipeline.load_lora_weights("Weights/pytorch_lora_weights.safetensors", weight_name="pytorch_lora_weights.safetensors")
|
29 |
+
return pipeline
|
30 |
|
31 |
|
32 |
if 'emotion' not in st.session_state:
|