fix: filter logic was wrong

pull/1/head 1.1.2
Bryce 2 years ago
parent 0834db63c8
commit 51a8b1b8d8

@ -255,7 +255,7 @@ def imagine(
if IMAGINAIRY_SAFETY_MODE != SafetyMode.DISABLED:
if is_nsfw(img, x_sample, half_mode=half_mode):
is_nsfw_img = True
if IMAGINAIRY_SAFETY_MODE == SafetyMode.FILTER:
if is_nsfw_img and IMAGINAIRY_SAFETY_MODE == SafetyMode.FILTER:
logger.info(" ⚠️ Filtering NSFW image")
img = img.filter(ImageFilter.GaussianBlur(radius=40))

@ -7,7 +7,7 @@ setup(
name="imaginAIry",
author="Bryce Drennan",
# author_email="b r y p y d o t io",
version="1.1.1",
version="1.1.2",
description="AI imagined images. Pythonic generation of stable diffusion images.",
long_description=readme,
long_description_content_type="text/markdown",

@ -8,7 +8,7 @@ filterwarnings =
[pylama]
format = pylint
skip = */.tox/*,*/.env/*,build/*,*/downloads/*,other/*,prolly_delete/*
skip = */.tox/*,*/.env/*,build/*,*/downloads/*,other/*,prolly_delete/*,downloads/*
linters = pylint,pycodestyle,pydocstyle,pyflakes,mypy
ignore =
Z999,C0103,C0301,C0114,C0115,C0116,

Loading…
Cancel
Save