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
Thanks for the feedback YangZhiBo. This is a known issue to us. The cause of this issue is: the generated image returned from Stability's image generation API is in base64 string format. That base64 string will exceed the input token limit for most of the models.
We plan to introduce integration with image hosting service providers such as cloudfare to solve this issue. Once that is done, the base64 representation of Image will be uploaded to the image hosting service, and return a simple url instead, and eventually accepted by the LLM.
If you have better idea of how to solve this, please let us know. In the meantime, before we launch fix for this, please use dalle 3 instead for image generation.
When the data returned by the image is obtained, an error is reported when passed to the model
async with ClientSession() as session:
async with session.post(url=url, headers=headers, json=data, proxy=CONFIG.PROXY) as response:
if response.status == 200:
data = await response.json()
base64_image = data["artifacts"][0]["base64"]
return PluginOutput(data={"base64_image": base64_image})
else:
data = await response.json()
print(data)
raise Exception(f"Error fetching data: {response.status}, {data}")
The text was updated successfully, but these errors were encountered: