|
|
--- |
|
|
title: Stable Diffusion Image Generator |
|
|
emoji: π’ |
|
|
colorFrom: blue |
|
|
colorTo: purple |
|
|
sdk: streamlit |
|
|
sdk_version: 1.42.2 |
|
|
app_file: src/app.py |
|
|
pinned: false |
|
|
license: apache-2.0 |
|
|
short_description: Transform your ideas into artistic masterpieces |
|
|
--- |
|
|
|
|
|
# π¨ AI Style Transfer Studio |
|
|
|
|
|
Transform your ideas into artistic masterpieces using Stable Diffusion with custom style embeddings. |
|
|
|
|
|
## π Features |
|
|
|
|
|
- Multiple pre-trained style embeddings (Dhoni, Mickey Mouse, Balloon, Lion King, Rose Flower) |
|
|
- Advanced color enhancement technology |
|
|
- User-friendly Streamlit interface |
|
|
- Real-time image generation |
|
|
- Example gallery with style comparisons |
|
|
|
|
|
## π οΈ Local Setup |
|
|
|
|
|
1. Clone the repository: |
|
|
```bash |
|
|
git clone https://github.com/yourusername/stable-diffusion-image-generator.git |
|
|
cd stable-diffusion-image-generator |
|
|
``` |
|
|
|
|
|
2. Create and activate a virtual environment (recommended): |
|
|
```bash |
|
|
python -m venv venv |
|
|
# On Windows |
|
|
venv\Scripts\activate |
|
|
# On Unix or MacOS |
|
|
source venv/bin/activate |
|
|
``` |
|
|
|
|
|
3. Install dependencies: |
|
|
```bash |
|
|
pip install -r requirements.txt |
|
|
``` |
|
|
|
|
|
4. Run the Streamlit app: |
|
|
```bash |
|
|
streamlit run src/app.py |
|
|
``` |
|
|
|
|
|
The app will open in your default web browser at `http://localhost:8501` |
|
|
|
|
|
## π Deploying to Hugging Face Spaces |
|
|
|
|
|
1. Create a new Space on Hugging Face: |
|
|
- Go to https://huggingface.co/spaces |
|
|
- Click "Create new Space" |
|
|
- Choose "Streamlit" as the SDK |
|
|
- Set the Space name and visibility |
|
|
|
|
|
2. Push your code to Hugging Face: |
|
|
```bash |
|
|
git add . |
|
|
git commit -m "Initial commit" |
|
|
git remote add space https://huggingface.co/spaces/yourusername/your-space-name |
|
|
git push space main |
|
|
``` |
|
|
|
|
|
3. The deployment will start automatically. Monitor the build logs on your Space's page. |
|
|
|
|
|
## π― Usage |
|
|
|
|
|
1. Enter your creative prompt in the text area |
|
|
2. Select a style from the available options |
|
|
3. Click "Generate Artwork" |
|
|
4. View both the original and color-enhanced versions of your creation |
|
|
|
|
|
## π Requirements |
|
|
|
|
|
- Python 3.8+ |
|
|
- CUDA-capable GPU (recommended) |
|
|
- 8GB+ RAM |
|
|
|
|
|
## π Environment Variables |
|
|
|
|
|
No additional environment variables are required for basic usage. |
|
|
|
|
|
## π License |
|
|
|
|
|
This project is licensed under the Apache 2.0 License. |
|
|
|
|
|
## π Acknowledgments |
|
|
|
|
|
- [Stable Diffusion](https://github.com/CompVis/stable-diffusion) for the base model |
|
|
- [Hugging Face](https://huggingface.co/) for model hosting and Spaces |
|
|
- [Streamlit](https://streamlit.io/) for the web interface |
|
|
|