-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
先放个方案在这
在100行左右开始改为
if re.search(r'nsfw', prompt, re.IGNORECASE):
reply = Reply(ReplyType.TEXT, "你想封我号吗,朋友")
else:
if len(options) > 0:
logger.info("[SD] cover options={}".format(options))
self.api.set_options(options)
logger.info("[SD] params={}".format(params))
result = self.api.txt2img(
**params
)
reply.type = ReplyType.IMAGE
b_img = io.BytesIO()
result.image.save(b_img, format="PNG")
reply.content = b_img
Metadata
Metadata
Assignees
Labels
No labels