Skip to content

Commit f53352f

Browse files
clintysayakpaulyiyixuxu
authored
Set main_input_name in StableDiffusionSafetyChecker to "clip_input" (#7500)
FlaxStableDiffusionSafetyChecker sets main_input_name to "clip_input". This makes StableDiffusionSafetyChecker consistent. Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: YiYi Xu <[email protected]>
1 parent 83ae24c commit f53352f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diffusers/pipelines/stable_diffusion/safety_checker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def cosine_distance(image_embeds, text_embeds):
3131

3232
class StableDiffusionSafetyChecker(PreTrainedModel):
3333
config_class = CLIPConfig
34+
main_input_name = "clip_input"
3435

3536
_no_split_modules = ["CLIPEncoderLayer"]
3637

0 commit comments

Comments
 (0)