CYDXDianXian / AI_image_gen

NovelAI绘图HoshinoBot插件版
GNU General Public License v3.0
95 stars 9 forks source link

图片信息获取失败,indexError #37

Closed yulongyu closed 1 year ago

yulongyu commented 1 year ago

看起来像是没调用到本地部署的ai接口,我确定本地部署成功,用其他的也测试过,现在这个错误该怎么解决

CYDXDianXian commented 1 year ago

是以图绘图报错吗?

yulongyu commented 1 year ago

不是图生图,只是最基本的绘图,之前我用另一个机器人图生图确实存在问题,好像接口有变化,但是这个是最基本的绘图都没产生。因为我用过别的机器人所以对问题还是比较熟悉。机器人报的错应该就是你的插件没有生成图片: Traceback (most recent call last): File "/home/yyl/workspace/HoshinoBot/hoshino/service.py", line 349, in wrapper ret = await func() File "/home/yyl/workspace/HoshinoBot/hoshino/modules/priconne/comic.py", line 106, in update_seeker index = load_index() File "/home/yyl/workspace/HoshinoBot/hoshino/modules/priconne/comic.py", line 21, in load_index with open(R.get('img/priconne/comic/index.json').path, encoding='utf8') as f: FileNotFoundError: [Errno 2] No such file or directory: './res/img/priconne/comic/index.json'

yulongyu commented 1 year ago

有没有什么其他调试排查问题的方案

CYDXDianXian commented 1 year ago

不是图生图,只是最基本的绘图,之前我用另一个机器人图生图确实存在问题,好像接口有变化,但是这个是最基本的绘图都没产生。因为我用过别的机器人所以对问题还是比较熟悉。机器人报的错应该就是你的插件没有生成图片: Traceback (most recent call last): File "/home/yyl/workspace/HoshinoBot/hoshino/service.py", line 349, in wrapper ret = await func() File "/home/yyl/workspace/HoshinoBot/hoshino/modules/priconne/comic.py", line 106, in update_seeker index = load_index() File "/home/yyl/workspace/HoshinoBot/hoshino/modules/priconne/comic.py", line 21, in load_index with open(R.get('img/priconne/comic/index.json').path, encoding='utf8') as f: FileNotFoundError: [Errno 2] No such file or directory: './res/img/priconne/comic/index.json'

这串报错是星乃内置插件公主连结漫画推送的报错,并不是我这个插件的报错

yulongyu commented 1 year ago

哦现在只有这个地方会报错,其他地方没有错误产生。我改怎么调试确定问题呢 我的端口被我改过,机器人的8080被我改成18080,资源的5000被我改成了16000,插件配置: { "base": { "daily_max": 200000000, "freq_limit": 6, "whitelistmode": false, "blacklistmode": true, "ban_if_group_num_over": 10000, "enable_forward_msg": true, "per_page_num": 28 }, "default": { "withdraw": 0, "arrange_tags": true, "add_db": true, "trans": true, "limit_word": true }, "NovelAI": { "api": "http://127.0.0.1:7860/", "token": "", "strength": "0.60" }, "baidu": { "baidu_trans": true, "baidu_api": "https://fanyi-api.baidu.com/api/trans/vip/translate", "baidu_appid": "", "baidu_key": "" }, "youdao": { "youdao_trans": false, "youdao_api": "https://openapi.youdao.com/api", "app_id": "", "app_key": "" }, "image4x": {

yulongyu commented 1 year ago

api地址我确定是对的,但是看起来好像并没有生效,我用的sd本地部署

yulongyu commented 1 year ago

机器人是有回复的说明插件是配置上了的,机器人回复: 已报错,获取图片信息失败,服务器未返回数据<class "IndexError">

CYDXDianXian commented 1 year ago

api地址我确定是对的,但是看起来好像并没有生效,我用的sd本地部署

用Stable Diffusion本地部署的话,还得搭建api才行,就是直接通过url输入tags实现绘图,并不是部署了本地Stable Diffusion就能直接用的。

yulongyu commented 1 year ago

我的本地sd的rest接口地址是http://192.168.1.171:7860/docs#/default 你是说这个地址么? image

yulongyu commented 1 year ago

上面这个地址也不行

yulongyu commented 1 year ago

直接7860端口,是这个地址 image

yulongyu commented 1 year ago

本地linux系统启动的时候加入了--api参数

CYDXDianXian commented 1 year ago

抱歉,并不是的,搭建好的api长这样,http://127.0.0.1:7860/got_image?tags=xxx

yulongyu commented 1 year ago

我以为novelai和sd都是用的一套东西,只是模型不同,实际上有区别????另一个机器人调用的接口是 image 你用的不是这个?能给个图么

yulongyu commented 1 year ago

我在另一个novelai网站用的这个接口地址是没问题的

CYDXDianXian commented 1 year ago

现在这个插件的api是路路佬搭建的,具体如何搭建的我也不清楚,这边只是利用了这个api实现了bot的在线绘图功能而已

yulongyu commented 1 year ago

官方tag生图接口肯定是http://192.168.1.XXX:7860/sdapi/v1/txt2img,如果按照你说的那样,那就是搭建的人又自己包了一层接口?这样不太合理,其他人完全无法使用,能否请教下路路佬 image

CYDXDianXian commented 1 year ago

你可以点本插件默认的api地址进去,加群问下路路佬