GithubHelp home page GithubHelp logo

marcus-arcadius / stable-diffusion-grpcserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hafriedlander/stable-diffusion-grpcserver

0.0 1.0 0.0 178 KB

An implementation of a server for the Stability AI Stable Diffusion API

License: Apache License 2.0

Shell 0.44% Python 99.56%

stable-diffusion-grpcserver's Introduction

An implementation of a server for the Stability AI API

Installation

Option 1 (recommended):

Install Miniconda, then in a Conda console:

git clone https://github.com/hafriedlander/stable-diffusion-grpcserver.git
cd stable-diffusion-grpcserver
conda env create -f environment.yaml
conda activate sd-grpc-server
flit install --pth-file
sets HF_API_TOKEN={your huggingface token}
python ./server.py

Option 2:

Create a directory and download https://raw.githubusercontent.com/hafriedlander/stable-diffusion-grpcserver/main/engines.yaml into it, then

PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cu116 pip install stable-diffusion-grpcserver
set HF_API_TOKEN={your huggingface token} 
sdgrpcserver

Features

  • Txt2Img and Img2Img from Stability-AI/Stability-SDK, specifying a prompt
  • Can load multiple pipelines, such as Stable and Waifu Diffusion, and swap between them as needed
  • Mid and Low VRAM modes for larger generated images at the expense of some performance
  • Adjustable NSFW behaviour
  • Significantly enhanced masked painting:
    • When Strength < 1, uses normal diffusers inpainting (with improved mask gradient handling)
    • When Strength >= 1 and <= 2, uses seamless outpainting algorithm. Strength above 1 acts as a boost - the higher the value, the more even areas protected by a mask are allowed to change
  • Euler, Euler_A samplers are currently integrated, and DDIM accepts an ETA parameter
  • Cancel over API (using GRPC cancel will abort the currently in progress generation)
  • Negative prompting (send a Prompt object with text and a negative weight)

Thanks to / Credits:

Roadmap

Core API functions not working yet:

  • Some samplers (like dpm2) are not currently supported in Diffusers
  • ChainGenerate not implemented

Extra features to add

Stable Cabal Logo

stable-diffusion-grpcserver's People

Contributors

hafriedlander avatar hamish-rush avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.