You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to call forge API with JSON that I've copied from API payload extension,
if I delete the alwayson_scripts key everything works fine, with it I'm getting the error:
list assignment index out of range
import requests
import json
import io
import base64
from PIL import Image
with open('payload.json', 'r') as file:
payload = json.load(file)
response = requests.post(url=f'http://127.0.0.1:7860/sdapi/v1/txt2img', json=payload)
print(response)
# <Response [500]>
print(response.json())
# {'error': 'IndexError', 'detail': '', 'body': '', 'message': 'list assignment index out of range'}
del payload['alwayson_scripts']
response = requests.post(url=f'http://127.0.0.1:7860/sdapi/v1/txt2img', json=payload)
print(response)
r = response.json()
for i in r['images']:
image = Image.open(io.BytesIO(base64.b64decode(i.split(",",1)[0])))
image
![00014-3806821438](https://github.com/user-attachments/assets/f7818f14-7ef4-43d6-87bd-3348e0e5493b)
I tried several other examples but they all seem to have the same problems , I would like to call via API:
sd1.5 realisticVisionV60B1_v51HyperVAE.safetensors,
ControlNet control_v11p_sd15_openpose [cab727d4],
ControlNet ip-adapter-faceid-plusv2_sd15 [6e14fc1a]
I'm trying to call forge API with JSON that I've copied from API payload extension,
if I delete the alwayson_scripts key everything works fine, with it I'm getting the error:
list assignment index out of range
I tried several other examples but they all seem to have the same problems , I would like to call via API:
sd1.5 realisticVisionV60B1_v51HyperVAE.safetensors,
ControlNet control_v11p_sd15_openpose [cab727d4],
ControlNet ip-adapter-faceid-plusv2_sd15 [6e14fc1a]
My system is Ubuntu 24.10, RTX 2070
payload.json
terminal_error.txt
Line when error happens https://github.com/lllyasviel/stable-diffusion-webui-forge/blob/main/modules/api/api.py#L362
The text was updated successfully, but these errors were encountered: