Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ from composable_diffusion.model_creation import create_model_and_diffusion as cr
|
|
16 |
from composable_diffusion.model_creation import model_and_diffusion_defaults as model_and_diffusion_defaults_for_clevr
|
17 |
|
18 |
from torch import autocast
|
19 |
-
from
|
20 |
|
21 |
# This notebook supports both CPU and GPU.
|
22 |
# On CPU, generating one sample may take on the order of 20 minutes.
|
@@ -27,7 +27,7 @@ device = th.device('cpu' if not th.cuda.is_available() else 'cuda')
|
|
27 |
print(device)
|
28 |
|
29 |
# init stable diffusion model
|
30 |
-
pipe =
|
31 |
"CompVis/stable-diffusion-v1-4",
|
32 |
use_auth_token=st.secrets["USER_TOKEN"]
|
33 |
).to(device)
|
|
|
16 |
from composable_diffusion.model_creation import model_and_diffusion_defaults as model_and_diffusion_defaults_for_clevr
|
17 |
|
18 |
from torch import autocast
|
19 |
+
from composable_stable_diffusion_pipeline import ComposableStableDiffusionPipeline
|
20 |
|
21 |
# This notebook supports both CPU and GPU.
|
22 |
# On CPU, generating one sample may take on the order of 20 minutes.
|
|
|
27 |
print(device)
|
28 |
|
29 |
# init stable diffusion model
|
30 |
+
pipe = ComposableStableDiffusionPipeline.from_pretrained(
|
31 |
"CompVis/stable-diffusion-v1-4",
|
32 |
use_auth_token=st.secrets["USER_TOKEN"]
|
33 |
).to(device)
|