admin 管理员组文章数量: 1086019
使用controlnet的过程中碰到以下问题,直接得到黑色图像
Potential NSFW content was detected in one or more images. A black image will be returned instead. Try again with a different prompt and/or seed.
搜索GitHub高赞解决方案:
pipe.safety_checker = lambda images, clip_input: (images, False)
然而,报错:
File "xxxxx\diffusers\src\diffusers\pipelines\controlnet\pipeline_controlnet.py", line 1327, in __call__
do_denormalize = [not has_nsfw for has_nsfw in has_nsfw_concept]
TypeError: 'bool' object is not iterable
去pipeline_controlnet.py里看代码:
因此,应该改为:
pipe.safety_checker = lambda images, clip_input: (images, None)
解决问题了
本文标签: NSFW potential Diffuser images detected
版权声明:本文标题:Diffuser: Potential NSFW content was detected in one or more images. 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/b/1738257958a1952132.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论