Skip to content

Investigate (local) StableDiffusion support #7

@inFocus7

Description

@inFocus7

We should support users who want to run as much as they can locally. There are many reasons why someone would want to do this:

  1. Save $$$ by not using APIs. From my tests, generating 12 prompts + images costs ~$1.5 USD.
  2. Generate content offline.
  3. Not hit any content filters denying generations.

This is an initial investigation to create multiple issues as it would involve multiple steps, such as

  • Investigating different local image GAN libraries (ex. stablediffusion a1111),
  • Updating the UI/UX to cleanly support choosing between using DALL-E vs StableDiffusion
    • This portion could get messy since the prompting would also differ and we'd likely have a separate UI for each.
  • (Optionally) doing the above + refactoring to allow plug-ability of more support in the future.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API

  • in a nutshell, could probably curl to its localhost port.

  • doing a GET: /sdapi/v1/sd-models returns available models, which i could display a name in the dropdown mapped to the full model name (theres a name and title field in the return)

  • could then, based on user input, perform a POST: /sdapi/v1/txt2img with all prompt data + chosen model and size (might be opinianated on sizes to standard cover 512x512 sizes and portrait).

  • note since a1111 ui + this are gradio they both get exposed on the same port, so will need to change mine.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions