Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD配置之后发现调用接口报错 #164

Closed
1 task done
sxzq46 opened this issue Mar 8, 2024 · 3 comments
Closed
1 task done

SD配置之后发现调用接口报错 #164

sxzq46 opened this issue Mar 8, 2024 · 3 comments

Comments

@sxzq46
Copy link

sxzq46 commented Mar 8, 2024

⚠️ 确认 issue 是否已存在 ⚠️

  • 我已经搜索了现有的问题,没有找到跟我问题相关的问题。

GPT-3 or GPT-4

GPT-3.5

操作系统

Linux

Bug 描述 📝

ERROR sd/service.go:304 任务执行失败:error http status code: {"error":null}
接口文档显示的接口是:
image

重现步骤 🕹

修改完配置,启动最新的秋叶SD之后,在页面立即生成的时候,api日志报错:ERROR sd/service.go:304 任务执行失败:error http status code: {"error":null}

你的应用配置信息

[[SdConfigs]]
  Enabled = true
  ApiURL = "http://10.147.17.90:7860"
  Txt2ImgJsonPath = "res/sd/text2img.json"
@sxzq46
Copy link
Author

sxzq46 commented Mar 8, 2024

看了下api/service/sd/service.go的代码,调用的是/run/predict这个接口

@sxzq46
Copy link
Author

sxzq46 commented Mar 8, 2024

后端的SD报错:
Traceback (most recent call last):
File "F:\秋葉整合包\sd-webui-aki-v4.5\python\lib\site-packages\gradio\routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "F:\秋葉整合包\sd-webui-aki-v4.5\python\lib\site-packages\gradio\blocks.py", line 1429, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "F:\秋葉整合包\sd-webui-aki-v4.5\python\lib\site-packages\gradio\blocks.py", line 1239, in preprocess_data
processed_input.append(block.preprocess(inputs[i]))
File "F:\秋葉整合包\sd-webui-aki-v4.5\python\lib\site-packages\gradio\components\image.py", line 274, in preprocess
im = processing_utils.decode_base64_to_image(x)
File "F:\秋葉整合包\sd-webui-aki-v4.5\python\lib\site-packages\gradio\processing_utils.py", line 59, in decode_base64_to_image
img = Image.open(BytesIO(base64.b64decode(image_encoded)))
File "F:\秋葉整合包\sd-webui-aki-v4.5\python\lib\base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding

@yangjian102621
Copy link
Owner

这是 SD 的API报错,现在已经改成用 sdapi 了,没有用 websocket。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants