Skip to content

Scripts that generate images through stable-diffusion API running locally on 42 Berlin supercomputer

Notifications You must be signed in to change notification settings

42Berlin/generative-art-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

generative-art-local

Scripts that generate images through stable-diffusion API running locally on 42 Berlin AI computer

Stable Diffusion

Stable Diffusion is an open source deep learning model that generates visuals. In 42 Berlin, we are running the Automatic1111 version on a powerful gaming computer and make it available from clusters computers. It provides many features, have a look at the API documentation

Example

This example generates prompts that generate images. To run it, create a virtual environment first, and install requirements.

cd generate_prompt_and_art
python3 -m venv venv && . venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt

Then, create an .env file and fill it with your API keys for stable-diffusion and openAI.
cp .env_example .env
python3 generate_art.py <prompts_output_file> <images_output_folder>

This simply generates a prompt in the <prompts_output_file>, from an initial one defined in utils_config.py, which is used to generate images in the <images_output_folder>

How does it work? It uses the API /sdapi/v1/txt2img POST request.

What's next

As you can see, there are many parameters that can be set, and may other requests that can be used. You are more than welcome to contribute to this repository, you can make a pull request or contact us directly if you want to add your own scripts.
Have fun, play around, and generate art!
Then we will run the new programs all-day long to display your creations on the lobby screen 🌈

About

Scripts that generate images through stable-diffusion API running locally on 42 Berlin supercomputer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages