FilipeR commited on
Commit
d890468
1 Parent(s): e7299ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -19,12 +19,12 @@ from gradio_imagefeed import ImageFeed
19
  DEFAULT_STYLE = "Photograph"
20
  DEFAULT_NEGATIVE = (
21
  "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon,"
22
- " drawing, anime, asian, bad anatomy:1.4), text, close up, cropped, out of frame,"
23
- " worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated,"
24
  " extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation,"
25
- " deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned"
26
- " face, disfigured, gross proportions, malformed limbs, missing arms, missing legs,"
27
- " extra arms, extra legs, fused fingers, too many fingers, long neck"
28
  )
29
  STYLES = {
30
  "Photograph": (
@@ -49,6 +49,9 @@ STYLES = {
49
  ),
50
  DEFAULT_NEGATIVE,
51
  ),
 
 
 
52
  }
53
 
54
 
@@ -76,14 +79,14 @@ NUM_IMAGES_PER_PROMPT = 3
76
 
77
  if torch.cuda.is_available():
78
  pipe = DiffusionPipeline.from_pretrained(
79
- "SG161222/RealVisXL_V3.0_Turbo",
80
  torch_dtype=torch.float16,
81
  use_safetensors=True,
82
  add_watermarker=False,
83
  variant="fp16",
84
  )
85
  pipe2 = DiffusionPipeline.from_pretrained(
86
- "SG161222/RealVisXL_V2.02_Turbo",
87
  torch_dtype=torch.float16,
88
  use_safetensors=True,
89
  add_watermarker=False,
@@ -175,7 +178,7 @@ with gr.Blocks(css=css, theme="rawrsor1/Everforest") as demo:
175
  )
176
  run_button = gr.Button("Run")
177
  #result = ImageFeed(label="Result")
178
- result = gr.Gallery(label="Result", columns=2, preview=True)
179
 
180
  with gr.Accordion("Advanced", open=False):
181
  use_negative_prompt = gr.Checkbox(
@@ -194,7 +197,7 @@ with gr.Blocks(css=css, theme="rawrsor1/Everforest") as demo:
194
  minimum=10,
195
  maximum=60,
196
  step=1,
197
- value=30,
198
  interactive=True
199
  )
200
  with gr.Row():
 
19
  DEFAULT_STYLE = "Photograph"
20
  DEFAULT_NEGATIVE = (
21
  "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon,"
22
+ " drawing, anime, asian, bad anatomy:1.4), text, cropped, out of frame,"
23
+ " worst quality, low quality, morbid, mutilated,"
24
  " extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation,"
25
+ " deformed, blurry, bad anatomy, bad proportions, extra limbs,"
26
+ " plastic, fake, missing arms, missing legs, fat, ugly, huge breasts,"
27
+ " extra arms, extra legs, fused fingers, too many fingers"
28
  )
29
  STYLES = {
30
  "Photograph": (
 
49
  ),
50
  DEFAULT_NEGATIVE,
51
  ),
52
+ 'No Style': (
53
+ '{positive}',
54
+ '')
55
  }
56
 
57
 
 
79
 
80
  if torch.cuda.is_available():
81
  pipe = DiffusionPipeline.from_pretrained(
82
+ "SG161222/RealVisXL_V4.0",
83
  torch_dtype=torch.float16,
84
  use_safetensors=True,
85
  add_watermarker=False,
86
  variant="fp16",
87
  )
88
  pipe2 = DiffusionPipeline.from_pretrained(
89
+ "SG161222/RealVisXL_V3.0_Turbo",
90
  torch_dtype=torch.float16,
91
  use_safetensors=True,
92
  add_watermarker=False,
 
178
  )
179
  run_button = gr.Button("Run")
180
  #result = ImageFeed(label="Result")
181
+ result = gr.Gallery(label="Result", preview=True)
182
 
183
  with gr.Accordion("Advanced", open=False):
184
  use_negative_prompt = gr.Checkbox(
 
197
  minimum=10,
198
  maximum=60,
199
  step=1,
200
+ value=3⁵,
201
  interactive=True
202
  )
203
  with gr.Row():