ComfyUI ReActor 禁用NSFW检查

 

  • M:\AI\ComfyUI\custom_nodes\comfyui-reactor-node\

  • 找到 nodes.pyA

script = FaceSwapScript()
pil_images = batch_tensor_to_pil(input_image)

# NSFW checker
# logger.status("Checking for any unsafe content...")
# pbar = progress_bar(len(pil_images))
# pil_images_sfw = []
# for img in pil_images:
# if state.interrupted or model_management.processing_interrupted():
# logger.status("Interrupted by User")
# break
# img_byte_arr = io.BytesIO()
# img.save(img_byte_arr, format='PNG')
# img_byte_arr = img_byte_arr.getvalue()
# if not sfw.nsfw_image(img_byte_arr, NSFWDET_MODEL_PATH):
# pil_images_sfw.append(img)
# pbar.update(1)
# pil_images = pil_images_sfw
# # #
# progress_bar_reset(pbar)

if len(pil_images) > 0:

if source_image is not None:
source = tensor_to_pil(source_image)

posted on 2026-01-02 22:11  zxddesk  阅读(0)  评论(0)    收藏  举报

导航