diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-12-10 14:54:02 +0300 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-12-10 14:54:16 +0300 |
commit | 991e2dcee9d6baa66b5c0b1969c4c07407be933a (patch) | |
tree | 8cde65654885dc069aee99994f12ae14ba1aac98 /modules/processing.py | |
parent | d06592267c745b4732026c4e0c499c9a4b3900a1 (diff) |
remove NSFW filter and its dependency; if you still want it, find it in the extensions section
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/processing.py b/modules/processing.py index 81400d14..056c9322 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -13,7 +13,7 @@ from skimage import exposure from typing import Any, Dict, List, Optional
import modules.sd_hijack
-from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste
+from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks
from modules.sd_hijack import model_hijack
from modules.shared import opts, cmd_opts, state
import modules.shared as shared
@@ -571,9 +571,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: devices.torch_gc()
- if opts.filter_nsfw:
- import modules.safety as safety
- x_samples_ddim = modules.safety.censor_batch(x_samples_ddim)
+ if p.scripts is not None:
+ p.scripts.postprocess_batch(p, x_samples_ddim, batch_number=n)
for i, x_sample in enumerate(x_samples_ddim):
x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2)
|