A simple Python application to generate images using the Stable Diffusion model.
This repository contains a script for generating images from text prompts using the open version of the Stable Diffusion model, powered by the Hugging Face's diffusers library. The script is designed to be easy to use and customizable for different prompts.
Before running the script, ensure you have the required dependencies installed.
- Python 3.8 or higher
- PyTorch (with GPU support for better performance)
diffuserslibrarytransformerslibrary
You can install the required libraries using pip:
pip install torch diffusers transformers- Clone this repository to your local machine.
- Navigate to the repository folder in your terminal.
- Run the script using Python. Example:
python generate_image.pyTo use the script, simply replace the prompt in the generate_image function call with your desired text. The script will generate an image based on this prompt and save it to your local directory.
generate_image("Your text prompt here")Contributions are welcome! If you have suggestions or improvements, feel free to fork this repository and submit a pull request.
This project is open-source and available under the MIT License.
This script utilizes the Stable Diffusion model from Hugging Face's diffusers library. Special thanks to the creators and contributors of these tools.