Spaces:
Runtime error
Runtime error
Update boomerang.py
Browse files- boomerang.py +5 -3
boomerang.py
CHANGED
@@ -11,9 +11,11 @@ from diffusers import StableDiffusionPipeline
|
|
11 |
from diffusers.models.unet_2d_condition import UNet2DConditionOutput
|
12 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=os.environ.get('HF_TOKEN_SD'))
|
|
|
|
|
17 |
|
18 |
#pipe = pipe.to('cuda')
|
19 |
|
|
|
11 |
from diffusers.models.unet_2d_condition import UNet2DConditionOutput
|
12 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
|
13 |
|
14 |
+
COLAB = False
|
15 |
+
if COLAB:
|
16 |
+
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=os.environ.get('HF_TOKEN_SD'))
|
17 |
+
else:
|
18 |
+
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=os.environ.get('HF_TOKEN_SD'))
|
19 |
|
20 |
#pipe = pipe.to('cuda')
|
21 |
|