Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmed5827/image_generation
This application provides a graphical user interface (GUI) for generating images using the Stable Diffusion model. The GUI allows users to input a text prompt, and the application generates an image based on the prompt.
https://github.com/ahmed5827/image_generation
ai cuda generative-ai image-generation
Last synced: about 1 month ago
JSON representation
This application provides a graphical user interface (GUI) for generating images using the Stable Diffusion model. The GUI allows users to input a text prompt, and the application generates an image based on the prompt.
- Host: GitHub
- URL: https://github.com/ahmed5827/image_generation
- Owner: Ahmed5827
- Created: 2024-12-31T23:38:49.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-31T23:50:29.000Z (about 1 month ago)
- Last Synced: 2025-01-01T00:22:34.332Z (about 1 month ago)
- Topics: ai, cuda, generative-ai, image-generation
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Generation with CUDA
This application provides a graphical user interface (GUI) for generating images using the Stable Diffusion model.
The GUI allows users to input a text prompt, and the application generates an image based on the prompt.## Requirements
- Python 3.8 or higher
- `torch` library
- `diffusers` library
- `tkinter` library
- `customtkinter` library
- `Pillow` library
- GPU with CUDA support## Installation
1. Clone the repository:
```bash
git clone https://github.com/Ahmed5827/Image_Generation.git
cd Image_Generation
```2. Create a virtual environment and activate it:
On Linux/MacOS:
```bash
python -m venv venv
source venv/bin/activate
```On Windows:
```bash
python -m venv venv
venv\Scripts\activate
```3. Install the required packages:
```bash
pip install -r requirements.txt
```## Usage
1. Make sure you have a valid hugging face token in the file `Token.py` with the following content:
```python
TOKEN = 'your_huggingface_token_here'
```2. Run the application:
```bash
python app.py
```3. Enter your text prompt in the input field and click the **"Generate"** button. The application will display the generated image.
## Troubleshooting
- Ensure that your GPU supports CUDA and is properly configured.
- Verify that the `Token.py` file exists and contains a valid token for accessing the Stable Diffusion model.
- If you encounter any issues related to CUDA, make sure that your CUDA drivers and `torch` library are correctly installed and compatible.## How It Works
1. The application uses `tkinter` and `customtkinter` for the GUI.
2. The text prompt entered by the user is processed using the Stable Diffusion model from the `diffusers` library.
3. The generated image is displayed directly in the GUI.