Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import streamlit as st
|
2 |
-
from diffusers import
|
3 |
import torch
|
4 |
import os
|
5 |
|
6 |
# Load Stable Diffusion model
|
7 |
@st.cache_resource
|
8 |
def load_model():
|
9 |
-
model_id = "
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16 if device == "cuda" else torch.float32)
|
12 |
pipe.to(device)
|
|
|
1 |
import streamlit as st
|
2 |
+
from diffusers import DiffusionPipeline
|
3 |
import torch
|
4 |
import os
|
5 |
|
6 |
# Load Stable Diffusion model
|
7 |
@st.cache_resource
|
8 |
def load_model():
|
9 |
+
model_id = "xinsir/controlnet-union-sdxl-1.0"
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16 if device == "cuda" else torch.float32)
|
12 |
pipe.to(device)
|