Giter VIP home page Giter VIP logo

nai3_train's People

Contributors

borntree avatar cyanautumn avatar littleapple-fp16 avatar sudoskys avatar wochenlong avatar zhulinyv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nai3_train's Issues

脚本疑似失效

使用脚本时,提示出现
“请求出现异常: 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数据。
QQ截图20240210171653

同样使用Java进行测试,依旧报“Caused by: java.net.ConnectException: Connection timed out: connect”连接超时错误。

由于相同的参数情况下,在postman中测试成功,排除token输入错误、请求头、体输入错误,怀疑官方是否有针对的屏蔽了相关本地API。

Nai3官方Api修正导致的报错

报错信息:
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请求异常错误

官方是否修改了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” 不知道该如何改正

seed设置逻辑应该删除

当同prompt多轮生成时,envvar的seed会在循环中被变动,随机的逻辑第二次生成就会失效。

既然有多轮生成,那么应该取消seed设置,要么需要添加一个 random_seed 的布尔设置,来额外指定。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.