Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- README.md +78 -103
- app.py +0 -1
- requirements.txt +1 -1
README.md
CHANGED
|
@@ -1,103 +1,78 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Stable Diffusion Style Explorer
|
| 3 |
-
emoji: π¨
|
| 4 |
-
colorFrom: purple
|
| 5 |
-
colorTo: pink
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
license: mit
|
| 11 |
-
---
|
| 12 |
-
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
##
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
-
|
| 24 |
-
|
| 25 |
-
##
|
| 26 |
-
|
| 27 |
-
###
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
-
|
| 47 |
-
|
| 48 |
-
##
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
*
|
| 52 |
-
*
|
| 53 |
-
*
|
| 54 |
-
|
| 55 |
-
##
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
##
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
### Prerequisites
|
| 80 |
-
* Python 3.10+
|
| 81 |
-
* GPU with 8GB+ VRAM (Recommended)
|
| 82 |
-
* Hugging Face Token (for model and style loading)
|
| 83 |
-
|
| 84 |
-
### Setup
|
| 85 |
-
1. **Clone the repository**.
|
| 86 |
-
2. **Environment Setup**:
|
| 87 |
-
```bash
|
| 88 |
-
pip install -r requirements.txt
|
| 89 |
-
```
|
| 90 |
-
3. **Run the App**:
|
| 91 |
-
```bash
|
| 92 |
-
python app.py
|
| 93 |
-
```
|
| 94 |
-
|
| 95 |
-
## π‘ Tips for Best Results
|
| 96 |
-
* **Guidance Scales**: Typical effective values for Contrast/Complexity/Vibrancy range from **500 to 1500**. Start low and increase gradually.
|
| 97 |
-
* **Prompting**: Keep prompts relatively simple to let the Textual Inversion style shine.
|
| 98 |
-
* **Seeds**: If you find an image layout you like, keep the seed fixed while adjusting the loss sliders to see exactly how the guidance "sculpts" that specific composition.
|
| 99 |
-
|
| 100 |
-
## π Credits
|
| 101 |
-
* **Model**: Stable Diffusion v1-4
|
| 102 |
-
* **Concepts**: π€ Hugging Face [SD Concepts Library](https://huggingface.co/sd-concepts-library)
|
| 103 |
-
* **Implementation**: Custom Triple-Loss Guidance Suite.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Stable Diffusion Style Explorer
|
| 3 |
+
emoji: π¨
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: pink
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 6.0.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Stable Diffusion Style Explorer
|
| 14 |
+
|
| 15 |
+
An interactive web application for exploring different artistic styles using Stable Diffusion with textual inversion.
|
| 16 |
+
|
| 17 |
+
## Features
|
| 18 |
+
|
| 19 |
+
- **5 Pre-configured Styles**: Cat Toy, GTA5 Artwork, Birb Style, Midjourney Style, and Arcane Style
|
| 20 |
+
- **Single Style Mode**: Generate images with a specific style, custom seed, and parameters
|
| 21 |
+
- **Compare All Styles**: Generate the same prompt across all 5 styles simultaneously
|
| 22 |
+
- **Seed Control**: Full control over random seeds for reproducible results
|
| 23 |
+
- **Adjustable Parameters**: Configure inference steps and guidance scale
|
| 24 |
+
|
| 25 |
+
## Usage
|
| 26 |
+
|
| 27 |
+
### Single Style Mode
|
| 28 |
+
1. Enter your prompt (use `<style>` as a placeholder for the style token)
|
| 29 |
+
2. Select a style from the dropdown
|
| 30 |
+
3. Set your desired seed value
|
| 31 |
+
4. Adjust inference steps and guidance scale if needed
|
| 32 |
+
5. Click "Generate Image"
|
| 33 |
+
|
| 34 |
+
### Compare All Styles Mode
|
| 35 |
+
1. Enter your prompt (use `<style>` as a placeholder)
|
| 36 |
+
2. Set a base seed value
|
| 37 |
+
3. Each style will use: `base_seed + (style_index * 100)`
|
| 38 |
+
4. Click "Generate All Styles" to see all variations
|
| 39 |
+
|
| 40 |
+
## Styles
|
| 41 |
+
|
| 42 |
+
- **Cat Toy**: Cute cat toy aesthetic
|
| 43 |
+
- **GTA5 Artwork**: GTA V game art style
|
| 44 |
+
- **Birb Style**: Artistic bird illustration style
|
| 45 |
+
- **Midjourney Style**: Midjourney AI art aesthetic
|
| 46 |
+
- **Arcane Style**: Arcane Netflix series art style
|
| 47 |
+
|
| 48 |
+
## Technical Details
|
| 49 |
+
|
| 50 |
+
- **Base Model**: CompVis/stable-diffusion-v1-4
|
| 51 |
+
- **Textual Inversion**: Concepts from [SD Concepts Library](https://huggingface.co/sd-concepts-library)
|
| 52 |
+
- **Framework**: Gradio + Diffusers
|
| 53 |
+
- **GPU**: Recommended for faster generation
|
| 54 |
+
|
| 55 |
+
## Local Development
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
# Clone the repository
|
| 59 |
+
git clone <your-repo-url>
|
| 60 |
+
cd <repo-name>
|
| 61 |
+
|
| 62 |
+
# Install dependencies
|
| 63 |
+
pip install -r requirements.txt
|
| 64 |
+
|
| 65 |
+
# Run the app
|
| 66 |
+
python app.py
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Deployment to Hugging Face Spaces
|
| 70 |
+
|
| 71 |
+
1. Create a new Space on Hugging Face
|
| 72 |
+
2. Select "Gradio" as the SDK
|
| 73 |
+
3. Upload `app.py`, `requirements.txt`, and `README.md`
|
| 74 |
+
4. The app will automatically build and deploy
|
| 75 |
+
|
| 76 |
+
## License
|
| 77 |
+
|
| 78 |
+
MIT License - Feel free to use and modify!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
|
@@ -544,6 +544,5 @@ with gr.Blocks(title="Stable Diffusion Style Explorer",theme=gr.themes.Soft()) a
|
|
| 544 |
if __name__ == "__main__":
|
| 545 |
#demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|
| 546 |
print("RUNNING THIS FILE:", __file__)
|
| 547 |
-
python -c "import gradio; print(gradio.__version__)"
|
| 548 |
demo.launch()
|
| 549 |
|
|
|
|
| 544 |
if __name__ == "__main__":
|
| 545 |
#demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|
| 546 |
print("RUNNING THIS FILE:", __file__)
|
|
|
|
| 547 |
demo.launch()
|
| 548 |
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
gradio>=
|
| 2 |
torch
|
| 3 |
torchvision
|
| 4 |
diffusers
|
|
|
|
| 1 |
+
gradio>=6.0.0
|
| 2 |
torch
|
| 3 |
torchvision
|
| 4 |
diffusers
|