Upload folder using huggingface_hub
Browse files
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"):
|