Commit
·
048d5e5
1
Parent(s):
3df6611
Updating readme.md
Browse files
README.md
CHANGED
|
@@ -10,58 +10,77 @@ pinned: false
|
|
| 10 |
short_description: Stable Diffusion using Text Inversion
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# Stable Diffusion
|
| 14 |
|
| 15 |
-
A Gradio web application that generates images using Stable Diffusion with various
|
| 16 |
|
| 17 |
## Features
|
| 18 |
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
- Dreams
|
| 22 |
- Midjourney Style
|
| 23 |
- Moebius
|
| 24 |
- Marc Allante
|
| 25 |
- WLOP
|
| 26 |
-
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
- User-friendly interface with preset prompts and custom prompt input
|
| 33 |
-
- Side-by-side comparison of different loss function effects
|
| 34 |
|
| 35 |
-
##
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
| 41 |
|
| 42 |
## Installation
|
| 43 |
|
| 44 |
-
1. Clone
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
2. Install the required dependencies:
|
| 46 |
```bash
|
| 47 |
pip install -r requirements.txt
|
| 48 |
```
|
| 49 |
-
|
|
|
|
|
|
|
| 50 |
```bash
|
| 51 |
python app.py
|
| 52 |
```
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
-
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
- PIL
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
## License
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
short_description: Stable Diffusion using Text Inversion
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Stable Diffusion with Text Inversion and Style Transfer
|
| 14 |
|
| 15 |
+
A Gradio-based web application that generates images using Stable Diffusion with various style concepts and loss functions.
|
| 16 |
|
| 17 |
## Features
|
| 18 |
|
| 19 |
+
- Text-to-image generation using Stable Diffusion v1.4
|
| 20 |
+
- Multiple pre-trained style concepts:
|
| 21 |
- Dreams
|
| 22 |
- Midjourney Style
|
| 23 |
- Moebius
|
| 24 |
- Marc Allante
|
| 25 |
- WLOP
|
| 26 |
+
- Five different image variations using loss functions:
|
| 27 |
+
1. Original (No Loss)
|
| 28 |
+
2. Blue Channel Loss
|
| 29 |
+
3. Elastic Loss
|
| 30 |
+
4. Symmetry Loss
|
| 31 |
+
5. Saturation Loss
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
## Requirements
|
| 34 |
|
| 35 |
+
- Python 3.8+
|
| 36 |
+
- PyTorch
|
| 37 |
+
- Diffusers
|
| 38 |
+
- Gradio
|
| 39 |
+
- PIL
|
| 40 |
+
- Torchvision
|
| 41 |
|
| 42 |
## Installation
|
| 43 |
|
| 44 |
+
1. Clone the repository:
|
| 45 |
+
```bash
|
| 46 |
+
git clone <repository-url>
|
| 47 |
+
cd stable-diffusion-using-text-inversion
|
| 48 |
+
```
|
| 49 |
2. Install the required dependencies:
|
| 50 |
```bash
|
| 51 |
pip install -r requirements.txt
|
| 52 |
```
|
| 53 |
+
|
| 54 |
+
## Usage
|
| 55 |
+
1. Run the application:
|
| 56 |
```bash
|
| 57 |
python app.py
|
| 58 |
```
|
| 59 |
+
2. Open your web browser and navigate to:
|
| 60 |
|
| 61 |
+
- Local URL: http://127.0.0.1:7860
|
| 62 |
+
- Or use the public URL provided in the terminal
|
| 63 |
+
3. Select or enter a prompt and choose a style concept
|
| 64 |
+
4. Click submit and wait for the images to generate.py
|
| 65 |
+
|
| 66 |
+
## Image Generation Process
|
| 67 |
+
The application generates five variations of each image:
|
|
|
|
| 68 |
|
| 69 |
+
1. Original Image : Base generation without modifications
|
| 70 |
+
2. Blue Channel Loss : Enhanced blue tones for atmospheric effects
|
| 71 |
+
3. Elastic Loss : Added elastic deformation for artistic distortion
|
| 72 |
+
4. Symmetry Loss : Enforced symmetrical features
|
| 73 |
+
5. Saturation Loss : Modified color saturation for vibrant effects
|
| 74 |
+
|
| 75 |
+
## Performance Notes
|
| 76 |
+
- Image generation takes several minutes per set
|
| 77 |
+
- Uses 384x384 resolution for optimal speed/quality balance
|
| 78 |
+
- CUDA-enabled GPU recommended for faster generation
|
| 79 |
+
- Supports CPU, CUDA, and MPS (Apple Silicon) backends
|
| 80 |
|
| 81 |
## License
|
| 82 |
+
MIT License
|
| 83 |
+
|
| 84 |
+
## Acknowledgments
|
| 85 |
+
- Stable Diffusion by CompVis
|
| 86 |
+
- Textual Inversion concepts from Hugging Face's SD Concepts Library
|