Update app_demo.py
Browse files- app_demo.py +3 -2
app_demo.py
CHANGED
|
@@ -35,8 +35,9 @@ DTYPE = torch.float32 # torch.float16 works as well, but pictures seem to be a
|
|
| 35 |
pipe = DiffusionPipeline.from_pretrained( model_id , custom_pipeline=model_id,
|
| 36 |
custom_revision="main",
|
| 37 |
low_cpu_mem_usage=True,
|
| 38 |
-
safety_checker=
|
| 39 |
-
|
|
|
|
| 40 |
)
|
| 41 |
#pipe.to(torch_device="cpu",torch_dtype="float16", torch_dtype=DTYPE)
|
| 42 |
pipe.to(torch_dtype="float32" )
|
|
|
|
| 35 |
pipe = DiffusionPipeline.from_pretrained( model_id , custom_pipeline=model_id,
|
| 36 |
custom_revision="main",
|
| 37 |
low_cpu_mem_usage=True,
|
| 38 |
+
safety_checker=None, # Disable NSFW filter
|
| 39 |
+
requires_safety_checker=False, # Skip warning
|
| 40 |
+
use_safetensors=True
|
| 41 |
)
|
| 42 |
#pipe.to(torch_device="cpu",torch_dtype="float16", torch_dtype=DTYPE)
|
| 43 |
pipe.to(torch_dtype="float32" )
|