Skip to content

akiyamasho/stable-diffusion-huggingface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HuggingFace-based Stable Diffusion Generator

  • Generates a single stable diffusion image with an input prompt.
  • Requires a HuggingFace account and a token.

Sample generated with v1.3 with minor edits on Photoshop and background extended with DALL-E: generation

Requirements

  1. python 3.9+
  2. HuggingFace account

How to run

  1. Install the requirements
pip install -r requirements.txt
  1. Accept the agreement in the Stable Diffusion v1.4 model repo to gain access to the model. agreement

  2. Create and retrieve a READ token from HuggingFace Settings token

  3. Login with your token in the command below

huggingface-cli login
  1. You can now start generating with:
python generate.py <prompt>

ex. - python generate.py "astronaut floating in space while spaceship drifts away"

Prompt Suffixes

You can use these prompt suffixes to generate decent-looking outputs.

Places

Add your description of a place at the start of the prompt.

  1. "[description of place], tone mapped, shiny, intricate, cinematic lighting, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by terry moore and greg rutkowski and alphonse mucha" (credit: @jquesnelle)

old harbour, tone mapped, shiny, intricate, cinematic lighting, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by terry moore and greg rutkowski and alphonse mucha

Humans

Add your description of a human at the start of the prompt.

  1. "[description of human] Clean Cel shaded vector art. Shutterstock. behance hd by lois van baarle, artgerm, Helen huang, by makoto shinkai and ilya kuvshinov, rossdraws, illustration" (credit: The_Bravinator on Reddit)

anime girl wearing a kimono, Clean Cel shaded vector art  Shutterstock  behance hd by lois van baarle, artgerm, Helen huang, by makoto shinkai and ilya kuvshinov, rossdraws, illustration

About

Stable diffusion using model repo hosted on HuggingFace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages