Skip to content

Commit 7fe1bf2

Browse files
Cast safety_checker to float32 (#276)
1 parent 11ba3a0 commit 7fe1bf2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python_coreml_stable_diffusion/torch2coreml.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,8 @@ def convert_safety_checker(pipe, args):
926926
)
927927
return
928928

929+
pipe.safety_checker = pipe.safety_checker.to(torch.float32)
930+
929931
im_h = pipe.vae.config.sample_size
930932
im_w = pipe.vae.config.sample_size
931933

0 commit comments

Comments
 (0)