晚上好~ 这里是星奈Sena⭐目前作为不活动系VUP996中~
こんばんは~せなです⭐いまわ活躍していないなVTBとして社畜中~
Ciallo~I'm Sena⭐Currently active as an inactive VTB~
Generate images by Stable-Diffusion-webui Based on Python | 使用Python的基于 SD-webui 的画图机器人(支持中文、Novelai和Naifu)
Home Page: https://nb.novelai.dev
License: MIT License
晚上好~ 这里是星奈Sena⭐目前作为不活动系VUP996中~
こんばんは~せなです⭐いまわ活躍していないなVTBとして社畜中~
Ciallo~I'm Sena⭐Currently active as an inactive VTB~
0.5.9
依照手册上进行了设定并配置了novelai的api等之后
在群内输入.AIDRAW' 或者是召唤的指令 无任何反应
进后台看了一下显示报错
No response
05-31 21:27:02 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_novelai.aidraw) failed.
Traceback (most recent call last):
File "C:\littlepaimon\bot.py", line 37, in
nonebot.run(app="mp_main:app", access_log=False)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot_init_.py", line 309, in run
get_driver().run(*args, **kwargs)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
uvicorn.run(
File "C:\LittlePaimon.venv\lib\site-packages\uvicorn\main.py", line 568, in run
server.run()
File "C:\LittlePaimon.venv\lib\site-packages\uvicorn\server.py", line 59, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Program Files\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete
self.run_forever()
File "C:\Program Files\Python39\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 596, in run_forever
self._run_once()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 1890, in _run_once
handle._run()
File "C:\Program Files\Python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot\message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot\message.py", line 187, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 753, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 728, in simple_run
await handler(
File "C:\LittlePaimon.venv\lib\site-packages\nonebot\dependencies_init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot_plugin_novelai\aidraw.py", line 115, in aidraw_get
logger.debug(fifo)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot_plugin_novelai\backend\base.py", line 262, in str
return self.repr().replace("\n", ";")
File "C:\LittlePaimon.venv\lib\site-packages\nonebot_plugin_novelai\backend\base.py", line 258, in repr
+ "".join(self.format())
File "C:\LittlePaimon.venv\lib\site-packages\nonebot_plugin_novelai\backend\base.py", line 245, in format
dict_self = dict(self)
File "C:\LittlePaimon.venv\lib\site-packages\nonebot_plugin_novelai\backend\base.py", line 242, in getitem
return getattr(self, item)
AttributeError: 'AIDRAW' object has no attribute 'sampler'
有些群刷的太快想设置一下长一点的CD,同时其他群不受影响
画图怎么鉴黄呢
画图怎么鉴黄呢
画图怎么鉴黄呢
v0.5.6
sd生成完成后bot未发送图片
NOVELAI_TOKEN=""
NOVELAI_TAG=""
NOVELAI_PAID=1
NOVELAI_DAYLIMIT=0
NOVELAI_MODE="sd"
NOVELAI_SITE="192.168.50.3:9000"
我的运行环境是……
python 3.10.4
我对BOT使用的指令是……
/aidraw 1 boy
我做的其他操作是……
无其他操作
发生了……
sd生成完成后bot未发送图片
No response
nb日志
03-16 12:38:37 [SUCCESS] nonebot | ONEBOT V11 21xxxxx61 | [message.group.normal]: Message 457688005 from 25xxxxxx69@[群:83xxxxx43] "/aidraw 1 boy"
03-16 12:38:37 [DEBUG] nonebot | Checking for matchers in priority 1...
03-16 12:38:37 [DEBUG] nonebot | Checking for matchers in priority 4...
03-16 12:38:37 [DEBUG] nonebot | Checking for matchers in priority 5...
03-16 12:38:37 [INFO] nonebot | Event will be handled by <Matcher from nonebot_plugin_novelai.aidraw, type=message, priority=5, temp=False>
03-16 12:38:37 [DEBUG] nonebot | Running matcher <Matcher from nonebot_plugin_novelai.aidraw, type=message, priority=5, temp=False>
03-16 12:38:37 [DEBUG] nonebot | Running handler <Dependent call=<function aidraw_get at 0x000001CAFFE536D0>, params=[ModelField(name='bot', type=Bot, required=True), ModelField(name='event', type=GroupMessageEvent, required=True), ModelField(name='args', type=Namespace, required=True)], parameterless=[]>
03-16 12:38:37 [DEBUG] nonebot_plugin_novelai | time=2023-03-16 12:38:37;user_id=25xxxxxx69;group_id=83xxxxx43;cost=0;batch=1;seed=[63850860];scale=11;strength=0.7;noise=0.2;sampler=k_euler_ancestral;model=;steps=28;width=512;height=768;img2img=False;tags=masterpiece, best quality,,1 boy ,;ntags=lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, pubic hair,long neck,blurry ,
03-16 12:38:37 [DEBUG] nonebot | OneBot V11 | Calling API send_msg
03-16 12:38:38 [INFO] nonebot_plugin_novelai | 队列开始
03-16 12:38:38 [DEBUG] nonebot | OneBot V11 | Calling API get_group_member_info
03-16 12:38:38 [INFO] nonebot_plugin_novelai | 队列剩余1人 | 开始生成:time=2023-03-16 12:38:37;user_id=25xxxxxx69;group_id=83xxxxx43;cost=0;batch=1;seed=[63850860];scale=11;strength=0.7;noise=0.2;sampler=k_euler_ancestral;model=;steps=28;width=512;height=768;img2img=False;tags=masterpiece, best quality,,1 boy ,;ntags=lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, pubic hair,long neck,blurry ,
03-16 12:38:58 [DEBUG] nonebot_plugin_novelai | 获取到返回图片,正在处理
03-16 12:38:58 [INFO] nonebot_plugin_novelai | 队列剩余1人 | 生成完毕:time=2023-03-16 12:38:37;user_id=2510166169;group_id=830019043;cost=0;batch=1;seed=[63850860];scale=11;strength=0.7;noise=0.2;sampler=k_euler_ancestral;model=;steps=28;width=512;height=768;img2img=False;tags=masterpiece, best quality,,1 boy ,;ntags=lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, pubic hair,long neck,blurry ,
03-16 12:38:58 [DEBUG] nonebot | OneBot V11 | Calling API send_group_forward_msg
03-16 12:38:58 [INFO] nonebot_plugin_novelai | 队列结束
03-16 12:38:58 [INFO] nonebot | Matcher <Matcher from nonebot_plugin_novelai.aidraw, type=message, priority=5, temp=False> running complete
03-16 12:38:58 [DEBUG] nonebot | Stop event propagation
白嫖服务器(Colab)的TOKEN,API和SITE都应该如何获取和配置?
这几点是否应当写进readme
配置参数env里设置了true,但是实际返回的仍然是group转发的形式
NOVELAI_PURE=true
本地直接测试的时候会有SSL报错,信息为
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host pypi.org:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')]
需要对这个方法做一下调整
nonebot_plugin_novelai/backend/base.py
修改前
async def post_(self, header: dict, post_api: str, json: dict): # 请求交互 async with aiohttp.ClientSession(headers=header) as session:
修改后
async def post_(self, header: dict, post_api: str, json: dict): # 请求交互 async with aiohttp.ClientSession(headers=header, connector=aiohttp.TCPConnector(ssl=False)) as session:
另外还有一些其他网络请求的方法也会有影响,比如那个version检查的函数
至于这个是不是正常,我不太了解哈,这个ssl问题会在什么情况下可以不用处理么?
当前版本缺少指定sampler和clip skip值的功能
指定sampler:可从列表中选一个。
指定clip skip值:整数,>=1
未来有空闲时间,本人会考虑自行实现并提交pr。因此特开此issue,请作者评估可行性。
请问有没有白名单功能,我怕我号寄了
我在自己搭建的sd中加入了很多lora模型,这些 lora模型有特定的触发词,比如澄闪是<lora:澄闪7(头巾与耳朵;headband,两套衣服santa coat)(建议):1>而这种打起来非常的不方便,所以希望用中文代替。
能够方便地生成预期的图片。
添加一个词条替换功能,比如可以自行配置 德狗/德克萨斯可以直接用来替换 lora:Omertosa:1,当然,被替换的可能不只是一个词条,还可能是一组词条,替换词也可能有很多个(很多角色都有外号)。比如上面提到的澄闪lora模型,内置的也有不同服装的触发词,在这种情况下可以用“澄闪皮肤”这一个中文词条来替换”<lora:澄闪7(头巾与耳朵;headband,两套衣服santa coat)(建议):1>,santa coat”这两个词条,触发词也可以替换为"粉毛皮肤"。
python3.9,插件版本0.5.5,以SD模式进行以图绘图出现如下报错
另外点数模式的配置是否有问题?config文件里仍写着2为无限制,但文档却写着3才是无限制,sd/naifu模式以图绘图能不能忽略点数模式的设置。
[ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_novelai.aidraw) failed.
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\envs\lesd2\Scripts\nb.exe_main.py", line 7, in
sys.exit(main())
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nb_cli\handlers\deploy.py", line 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot_init.py", line 273, in run
get_driver().run(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot\drivers\fastapi.py", line 172, in run
uvicorn.run(
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\uvicorn\main.py", line 463, in run
server.run()
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\asyncio\base_events.py", line 634, in run_until_complete
self.run_forever()
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\asyncio\base_events.py", line 601, in run_forever
self._run_once()
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\asyncio\base_events.py", line 1905, in _run_once
handle._run()
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot\message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot\message.py", line 186, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot\internal\matcher.py", line 716, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot\internal\matcher.py", line 688, in simple_run
await handler(
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot\dependencies_init.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot_plugin_novelai\aidraw.py", line 86, in aidraw_get
args.tags = await prepocess_tags(args.tags)
File "C:\ProgramData\Anaconda3\envs\lesd2\lib\site-packages\nonebot_plugin_novelai\utils\prepocess.py", line 6, in prepocess_tags
tags: str = "".join([i+" " for i in tags])
携带tag时报错:TypeError: sequence item 1: expected str instance, Message found
未携带tag报错:TypeError: sequence item 0: expected str instance, Message found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.