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

Stable Diffusion integration #157

Open
kaustubh-cf opened this issue Sep 29, 2023 · 4 comments
Open

Stable Diffusion integration #157

kaustubh-cf opened this issue Sep 29, 2023 · 4 comments

Comments

@kaustubh-cf
Copy link
Contributor

kaustubh-cf commented Sep 29, 2023

Requirement

Just like the the Dalle Bot we also want to integrate Stable Diffusion for image generation techniques. Replicate provides an API through which we can do this.

Have a look at this demo here on how to use the API.
In the textbase/models.py you'll see a class for DallE which returns the URL of the generated image.

It appears on the UI something like this-
Screenshot 2023-09-25 at 3 30 58 AM

To make sure that this is rendered properly in the frontend, in the response inside main.py we will use the Image class as done in DallE

return {
    "messages": [Image(url=bot_response)],
    "state": state
}

Add a StableDiffusion class in the models.py and add the logic there.

On the same line, I guess replicate must give a URL for the image generated. We can use a similar approach in that as well.
Make sure to make another directory as textbase/examples/stable-diffusion after testing that things are working fine and also add the respective docs.

Refer to docs.textbase.ai for setting up the project locally

@Rahul917-Kumar
Copy link

hey @kaus-cofactory I want to take up this issue

@kaustubh-cf
Copy link
Contributor Author

Sure @Rahul917-Kumar

@kaustubh-cf
Copy link
Contributor Author

@Rahul917-Kumar are you still working on this?

@Rahul917-Kumar
Copy link

Yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants