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

StabilityAI has bug #86

Open
YangZhiBoGreenHand opened this issue Apr 3, 2024 · 2 comments
Open

StabilityAI has bug #86

YangZhiBoGreenHand opened this issue Apr 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@YangZhiBoGreenHand
Copy link

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}")

@YangZhiBoGreenHand
Copy link
Author

image image

@DynamesC DynamesC self-assigned this Apr 3, 2024
@DynamesC DynamesC added the bug Something isn't working label Apr 3, 2024
@DynamesC
Copy link
Collaborator

DynamesC commented Apr 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants