From 6932a9e87150d7717e76d69da5695479dae92f81 Mon Sep 17 00:00:00 2001 From: butaixianran Date: Thu, 28 Sep 2023 09:50:28 +0800 Subject: [PATCH] fix nsfw issue --- scripts/ch_lib/civitai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ch_lib/civitai.py b/scripts/ch_lib/civitai.py index 2a15ae7..0efd71b 100644 --- a/scripts/ch_lib/civitai.py +++ b/scripts/ch_lib/civitai.py @@ -342,7 +342,7 @@ def get_preview_image_by_model_path(model_path:str, max_size_preview, skip_nsfw_ if model_info["images"]: for img_dict in model_info["images"]: if "nsfw" in img_dict.keys(): - if img_dict["nsfw"]: + if img_dict["nsfw"] and img_dict["nsfw"] != "None": util.printD("This image is NSFW") if skip_nsfw_preview: util.printD("Skip NSFW image")