Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
39dfb7ab
Unverified
Commit
39dfb7ab
authored
Mar 07, 2024
by
Dhruv Nair
Committed by
GitHub
Mar 07, 2024
Browse files
Raise an error when trying to use SD Cascade Decoder with dtype bfloat16 and torch < 2.2 (#7244)
update
parent
19683569
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade.py
...users/pipelines/stable_cascade/pipeline_stable_cascade.py
+3
-1
No files found.
src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade.py
View file @
39dfb7ab
...
...
@@ -19,7 +19,7 @@ from transformers import CLIPTextModel, CLIPTokenizer
from
...models
import
StableCascadeUNet
from
...schedulers
import
DDPMWuerstchenScheduler
from
...utils
import
logging
,
replace_example_docstring
from
...utils
import
is_torch_version
,
logging
,
replace_example_docstring
from
...utils.torch_utils
import
randn_tensor
from
..pipeline_utils
import
DiffusionPipeline
,
ImagePipelineOutput
from
..wuerstchen.modeling_paella_vq_model
import
PaellaVQModel
...
...
@@ -361,6 +361,8 @@ class StableCascadeDecoderPipeline(DiffusionPipeline):
device
=
self
.
_execution_device
dtype
=
self
.
decoder
.
dtype
self
.
_guidance_scale
=
guidance_scale
if
is_torch_version
(
"<"
,
"2.2.0"
)
and
dtype
==
torch
.
bfloat16
:
raise
ValueError
(
"`StableCascadeDecoderPipeline` requires torch>=2.2.0 when using `torch.bfloat16` dtype."
)
# 1. Check inputs. Raise error if not correct
self
.
check_inputs
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment