File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/diffusers/pipelines/stable_cascade Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 19
19
20
20
from ...models import StableCascadeUNet
21
21
from ...schedulers import DDPMWuerstchenScheduler
22
- from ...utils import logging , replace_example_docstring
22
+ from ...utils import is_torch_version , logging , replace_example_docstring
23
23
from ...utils .torch_utils import randn_tensor
24
24
from ..pipeline_utils import DiffusionPipeline , ImagePipelineOutput
25
25
from ..wuerstchen .modeling_paella_vq_model import PaellaVQModel
@@ -361,6 +361,8 @@ def __call__(
361
361
device = self ._execution_device
362
362
dtype = self .decoder .dtype
363
363
self ._guidance_scale = guidance_scale
364
+ if is_torch_version ("<" , "2.2.0" ) and dtype == torch .bfloat16 :
365
+ raise ValueError ("`StableCascadeDecoderPipeline` requires torch>=2.2.0 when using `torch.bfloat16` dtype." )
364
366
365
367
# 1. Check inputs. Raise error if not correct
366
368
self .check_inputs (
You can’t perform that action at this time.
0 commit comments