-
Notifications
You must be signed in to change notification settings - Fork 254
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
StabilityAI has bug #86
Comments
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: