wochenlong / nai3_train Goto Github PK
View Code? Open in Web Editor NEWnai3图片炼丹专门流水线,Novelai v 3的一键生成、打标和处理脚本
License: Apache License 2.0
nai3图片炼丹专门流水线,Novelai v 3的一键生成、打标和处理脚本
License: Apache License 2.0
使用脚本时,提示出现
“请求出现异常: HTTPSConnectionPool(host='image.novelai.net', port=443): Max retries exceeded with url: /ai/generate-image (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000018DA30FB460>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))”
连接超时。
但是使用postman做接口测试时发现,接口正常获取到zip数据。
同样使用Java进行测试,依旧报“Caused by: java.net.ConnectException: Connection timed out: connect”连接超时错误。
由于相同的参数情况下,在postman中测试成功,排除token输入错误、请求头、体输入错误,怀疑官方是否有针对的屏蔽了相关本地API。
每个角色分别使用多组prompt一键搞定,虽然一个晚上roll的图也不多
在运行random_characetrs.py时生成的图像只有固定画师词和角色,似乎没有读取prompt目录的文件
报错信息:
G:\novelai\tieba\SD-WebUI\stable-diffusion-webui-master\outputs\nicejob\nai3\nai3_train-main\newest\nai3_train-main>python random_characetrs.py
Traceback (most recent call last):
File "G:\novelai\tieba\SD-WebUI\stable-diffusion-webui-master\outputs\nicejob\nai3\nai3_train-main\newest\nai3_train-main\random_characetrs.py", line 144, in
image_data = generator.generate_image("prefix_", random_mode=random_mode)
File "G:\novelai\tieba\SD-WebUI\stable-diffusion-webui-master\outputs\nicejob\nai3\nai3_train-main\newest\nai3_train-main\random_characetrs.py", line 111, in generate_image
with zipfile.ZipFile(io.BytesIO(r.content), mode="r") as zip:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\zipfile.py", line 1269, in init
self._RealGetContents()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\zipfile.py", line 1336, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
可能的问题:
API 响应问题:requests.post 请求的 API 可能没有返回预期的 ZIP 文件。可能是因为请求出错,或者 API 的行为已经改变,不再返回 ZIP 格式的内容。
请求失败处理:如果请求失败(例如,因为网络问题或 API 限制),r.content 可能不包含有效的 ZIP 数据。在尝试将 r.content 作为 ZIP 文件打开之前,应该检查请求的响应状态码 r.status_code 是否为 200(表示成功)。
官方是否修改了API 我的程序现在会提示 “请求出现异常: 404 Client Error: Not Found for url: https://api.novelai.net/ai/generate-image” 我查到在X上官方说 将图像生成相关端点从标准NovelAI API [http://api.novelai.net] 中分离出来,将所有图像生成相关方面移动到 [http://image.novelai.net] 但是我按照说明替换程序中的API后会报 “请求出现异常: 400 Client Error: Bad Request for url: https://image.novelai.net/ai/generate-image” 不知道该如何改正
当同prompt多轮生成时,envvar的seed会在循环中被变动,随机的逻辑第二次生成就会失效。
既然有多轮生成,那么应该取消seed设置,要么需要添加一个 random_seed 的布尔设置,来额外指定。
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.