A python project to generate images using the Stable Diffusion Model and the Hugging Face API.
Check out my blog for further details:
https://medium.com/@deodeshmukh.aditya/using-ai-to-generate-images-a-blog-on-stable-diffusion-e6204811679b
The Stable Diffusion model is used to generate images using various kinds of pipelines, including pre-existing pipelines such as image-to-image, text-to-image pipelines as well as custom pipelines such as weighted multiple image-to-image pipeline.
- Install python on your local system
- Install CUDA and CUDNN on your local system.
- Install the required packages in your folder.
For this run the following command in your terminal
pip install requirements.txt
Run the following command in your terminal to generate an image when given a specific prompt:
python .\Image_Generators\text_to_image.py "<prompt>"
Place your images in a folder named "Stored_Images"
Run the following command in your terminal to generate an image when given a specific prompt and an image to model:
python .\Image_Generators\image_to_image.py "<prompt>" "<image_name>"
Place your images in a folder named "Stored_Images"
Run the following command in your terminal to generate an image when given a specific prompt and a weighted image needs to be calculated from 2 images:
python .\Image_Generators\image_from_mult_image.py "<prompt>" "<image_name>"
Place your images in a folder named "Stored_Images"
Run the following command in your terminal to generate an transition from one image to another:
python .\Image_Generators\linear_interpolation.py "<prompt>" "<Image1>" "<Image2>"
Note: To know more about optional parameters enter the command
python .\Image_Generators\<Function_Name>.py -h