c83908758 commited on
Commit
ba1b138
·
verified ·
1 Parent(s): 98400a2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -62,7 +62,12 @@ def load_pipe():
62
  pipe = AutoPipelineForText2Image.from_pretrained(
63
  MODEL_ID,
64
  torch_dtype=_dtype,
 
65
  )
 
 
 
 
66
  if hasattr(pipe, "enable_attention_slicing"):
67
  pipe.enable_attention_slicing()
68
  if hasattr(pipe, "vae") and hasattr(pipe.vae, "enable_tiling"):
 
62
  pipe = AutoPipelineForText2Image.from_pretrained(
63
  MODEL_ID,
64
  torch_dtype=_dtype,
65
+ safety_checker=None,
66
  )
67
+ if hasattr(pipe, "safety_checker"):
68
+ pipe.safety_checker = None
69
+ if hasattr(pipe, "requires_safety_checker"):
70
+ pipe.requires_safety_checker = False
71
  if hasattr(pipe, "enable_attention_slicing"):
72
  pipe.enable_attention_slicing()
73
  if hasattr(pipe, "vae") and hasattr(pipe.vae, "enable_tiling"):