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

Get back the original image blob received from the Stability AI API instead of using an output path? #19

Open
roschler opened this issue Aug 18, 2023 · 0 comments

Comments

@roschler
Copy link

Hello. Thank you for creating this easy to use client package to the Stability AI API.

I am using the code below to generate images. It works great. However, I would like to get the image blob returned from the Stability AI API instead of the current case where your package writes it to the specified output path on my behalf. This would be very helpful for two important reasons:

  1. I store the generated image files in an AWS S3 bucket. If I could get the original image blob and put it directly to S3, it would save the unnecessary intermediary step of the image blob being written to the server's local storage.

  2. By eliminating the need for local storage, the Node.js code I have would be more amenable to execution contexts like AWS Lambda functions or other alternate contexts.

Is there a way to use the library this way? I looked at the minified code for generateAsync() and I sawa ternary statement that defaults to the console out if the output path specified in the call is empty. That isn't helpful in my use case. If not, it would be great to have this feature added to the library (direct return of the received image blog for the generated image).

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

1 participant