diff --git a/python_coreml_stable_diffusion/torch2coreml.py b/python_coreml_stable_diffusion/torch2coreml.py index 344d5354..770f52b6 100644 --- a/python_coreml_stable_diffusion/torch2coreml.py +++ b/python_coreml_stable_diffusion/torch2coreml.py @@ -926,6 +926,8 @@ def convert_safety_checker(pipe, args): ) return + pipe.safety_checker = pipe.safety_checker.to(torch.float32) + im_h = pipe.vae.config.sample_size im_w = pipe.vae.config.sample_size