MilindChawre commited on
Commit
048d5e5
·
1 Parent(s): 3df6611

Updating readme.md

Browse files
Files changed (1) hide show
  1. README.md +49 -30
README.md CHANGED
@@ -10,58 +10,77 @@ pinned: false
10
  short_description: Stable Diffusion using Text Inversion
11
  ---
12
 
13
- # Stable Diffusion using Text Inversion
14
 
15
- A Gradio web application that generates images using Stable Diffusion with various text inversion concepts and loss functions.
16
 
17
  ## Features
18
 
19
- - Generate images using Stable Diffusion v1.4
20
- - Apply different artistic styles using text inversion concepts:
21
  - Dreams
22
  - Midjourney Style
23
  - Moebius
24
  - Marc Allante
25
  - WLOP
26
- - Automatic application of multiple loss functions:
27
- - No Loss (Base generation)
28
- - Blue Channel Loss
29
- - Elastic Transformation Loss
30
- - Symmetry Loss
31
- - Saturation Loss
32
- - User-friendly interface with preset prompts and custom prompt input
33
- - Side-by-side comparison of different loss function effects
34
 
35
- ## Usage
36
 
37
- 1. Select a preset prompt or enter your own custom prompt
38
- 2. Choose a style concept from the dropdown menu
39
- 3. Click "Submit" to generate images
40
- 4. View the results showing different loss function effects side by side
 
 
41
 
42
  ## Installation
43
 
44
- 1. Clone this repository
 
 
 
 
45
  2. Install the required dependencies:
46
  ```bash
47
  pip install -r requirements.txt
48
  ```
49
- 3. Run the application:
 
 
50
  ```bash
51
  python app.py
52
  ```
 
53
 
54
- ## Requirements
55
- - Python 3.7+
56
- - PyTorch
57
- - Diffusers
58
- - Transformers
59
- - Gradio
60
- - Torchvision
61
- - PIL
62
 
63
- ## Model Details
64
- The application uses the CompVis/stable-diffusion-v1-4 model with text inversion concepts from the Hugging Face SD concepts library. The model runs with float16 precision and supports CUDA, MPS, and CPU devices.
 
 
 
 
 
 
 
 
 
65
 
66
  ## License
67
- This project uses the CompVis/stable-diffusion-v1-4 model which is subject to the CreativeML Open RAIL-M license.
 
 
 
 
 
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