Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -432,13 +432,13 @@ def generate(
|
|
| 432 |
)
|
| 433 |
|
| 434 |
safety_checker_input = pipe.safety_feature_extractor([image], return_tensors="pt").pixel_values.cuda()
|
| 435 |
-
_, has_nsfw_concept = pipe.safety_checker
|
| 436 |
images=[torch.zeros(1)], clip_input=safety_checker_input
|
| 437 |
)
|
| 438 |
has_nsfw_concept = has_nsfw_concept[0]
|
| 439 |
|
| 440 |
if has_nsfw_concept:
|
| 441 |
-
image = Image.open(
|
| 442 |
|
| 443 |
if gallery_images is None:
|
| 444 |
gallery_images = []
|
|
|
|
| 432 |
)
|
| 433 |
|
| 434 |
safety_checker_input = pipe.safety_feature_extractor([image], return_tensors="pt").pixel_values.cuda()
|
| 435 |
+
_, has_nsfw_concept = pipe.safety_checker = none
|
| 436 |
images=[torch.zeros(1)], clip_input=safety_checker_input
|
| 437 |
)
|
| 438 |
has_nsfw_concept = has_nsfw_concept[0]
|
| 439 |
|
| 440 |
if has_nsfw_concept:
|
| 441 |
+
image = Image.open()
|
| 442 |
|
| 443 |
if gallery_images is None:
|
| 444 |
gallery_images = []
|