kadirnar commited on
Commit
34c4118
1 Parent(s): fb22a86

Upload 29 files

Browse files
diffusion_webui/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.8.0"
 
1
+ __version__ = "2.0.1"
diffusion_webui/diffusion_models/stable_diffusion/text2img_app.py CHANGED
@@ -3,7 +3,10 @@ import torch
3
  from diffusers import StableDiffusionPipeline
4
 
5
  from diffusion_webui.utils.model_list import stable_model_list
6
- from diffusion_webui.utils.scheduler_list import get_scheduler_list
 
 
 
7
 
8
 
9
  class StableDiffusionText2ImageGenerator:
@@ -111,14 +114,8 @@ class StableDiffusionText2ImageGenerator:
111
  with gr.Column():
112
 
113
  text2image_scheduler = gr.Dropdown(
114
- choices=[
115
- "DDIM",
116
- "EulerA",
117
- "Euler",
118
- "LMS",
119
- "Heun",
120
- ],
121
- value="DDIM",
122
  label="Scheduler",
123
  )
124
 
 
3
  from diffusers import StableDiffusionPipeline
4
 
5
  from diffusion_webui.utils.model_list import stable_model_list
6
+ from diffusion_webui.utils.scheduler_list import (
7
+ SCHEDULER_LIST,
8
+ get_scheduler_list,
9
+ )
10
 
11
 
12
  class StableDiffusionText2ImageGenerator:
 
114
  with gr.Column():
115
 
116
  text2image_scheduler = gr.Dropdown(
117
+ choices=SCHEDULER_LIST,
118
+ value=SCHEDULER_LIST[0],
 
 
 
 
 
 
119
  label="Scheduler",
120
  )
121
 
diffusion_webui/upscaler_models/codeformer_upscaler.py CHANGED
@@ -11,14 +11,14 @@ class CodeformerUpscalerGenerator:
11
  upscale: int,
12
  codeformer_fidelity: int,
13
  ):
14
-
15
  pipe = inference_app(
16
- image=image_path,
17
- background_enhance=background_enhance,
18
- face_upsample=face_upsample,
19
- upscale=upscale,
20
- codeformer_fidelity=codeformer_fidelity,
21
- )
22
 
23
  return [pipe]
24
 
 
11
  upscale: int,
12
  codeformer_fidelity: int,
13
  ):
14
+
15
  pipe = inference_app(
16
+ image=image_path,
17
+ background_enhance=background_enhance,
18
+ face_upsample=face_upsample,
19
+ upscale=upscale,
20
+ codeformer_fidelity=codeformer_fidelity,
21
+ )
22
 
23
  return [pipe]
24
 
diffusion_webui/utils/data_utils.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+
3
+
4
+ def image_grid(imgs, rows, cols):
5
+ assert len(imgs) == rows * cols
6
+
7
+ w, h = imgs[0].size
8
+ grid = Image.new("RGB", size=(cols * w, rows * h))
9
+
10
+ for i, img in enumerate(imgs):
11
+ grid.paste(img, box=(i % cols * w, i // cols * h))
12
+ return grid
diffusion_webui/utils/model_list.py CHANGED
@@ -2,6 +2,12 @@ stable_model_list = [
2
  "runwayml/stable-diffusion-v1-5",
3
  "stabilityai/stable-diffusion-2-1",
4
  "prompthero/openjourney-v4",
 
 
 
 
 
 
5
  ]
6
 
7
  controlnet_canny_model_list = [
 
2
  "runwayml/stable-diffusion-v1-5",
3
  "stabilityai/stable-diffusion-2-1",
4
  "prompthero/openjourney-v4",
5
+ "wavymulder/Analog-Diffusion",
6
+ "dreamlike-art/dreamlike-diffusion-1.0",
7
+ "gsdf/Counterfeit-V2.5",
8
+ "dreamlike-art/dreamlike-photoreal-2.0"
9
+
10
+
11
  ]
12
 
13
  controlnet_canny_model_list = [