timpearce commited on
Commit
7780f0d
·
1 Parent(s): 3079056

Update steps number

Browse files
Files changed (1) hide show
  1. app.py +5 -36
app.py CHANGED
@@ -20,6 +20,7 @@ if device == "cuda":
20
  pipe = StableDiffusionPipeline.from_pretrained(
21
  model_id,
22
  use_auth_token=AUTH_TOKEN,
 
23
  )
24
  else:
25
  print('No Nvidia GPU in system!')
@@ -32,7 +33,7 @@ pipe.to(device)
32
  pipe.safety_checker = dummy
33
  #torch.backends.cudnn.benchmark = True
34
 
35
- def infer(prompt="", samples=4, steps=20, scale=7.5, seed=1437181781):
36
  generator = torch.Generator(device=device).manual_seed(seed)
37
  return pipe(
38
  [prompt] * samples,
@@ -196,43 +197,11 @@ with block:
196
  align-items: center;
197
  gap: 0.8rem;
198
  font-size: 1.75rem;
 
199
  "
200
  >
201
- <svg
202
- width="0.65em"
203
- height="0.65em"
204
- viewBox="0 0 115 115"
205
- fill="none"
206
- xmlns="http://www.w3.org/2000/svg"
207
- >
208
- <rect width="23" height="23" fill="white"></rect>
209
- <rect y="69" width="23" height="23" fill="white"></rect>
210
- <rect x="23" width="23" height="23" fill="#AEAEAE"></rect>
211
- <rect x="23" y="69" width="23" height="23" fill="#AEAEAE"></rect>
212
- <rect x="46" width="23" height="23" fill="white"></rect>
213
- <rect x="46" y="69" width="23" height="23" fill="white"></rect>
214
- <rect x="69" width="23" height="23" fill="black"></rect>
215
- <rect x="69" y="69" width="23" height="23" fill="black"></rect>
216
- <rect x="92" width="23" height="23" fill="#D9D9D9"></rect>
217
- <rect x="92" y="69" width="23" height="23" fill="#AEAEAE"></rect>
218
- <rect x="115" y="46" width="23" height="23" fill="white"></rect>
219
- <rect x="115" y="115" width="23" height="23" fill="white"></rect>
220
- <rect x="115" y="69" width="23" height="23" fill="#D9D9D9"></rect>
221
- <rect x="92" y="46" width="23" height="23" fill="#AEAEAE"></rect>
222
- <rect x="92" y="115" width="23" height="23" fill="#AEAEAE"></rect>
223
- <rect x="92" y="69" width="23" height="23" fill="white"></rect>
224
- <rect x="69" y="46" width="23" height="23" fill="white"></rect>
225
- <rect x="69" y="115" width="23" height="23" fill="white"></rect>
226
- <rect x="69" y="69" width="23" height="23" fill="#D9D9D9"></rect>
227
- <rect x="46" y="46" width="23" height="23" fill="black"></rect>
228
- <rect x="46" y="115" width="23" height="23" fill="black"></rect>
229
- <rect x="46" y="69" width="23" height="23" fill="black"></rect>
230
- <rect x="23" y="46" width="23" height="23" fill="#D9D9D9"></rect>
231
- <rect x="23" y="115" width="23" height="23" fill="#AEAEAE"></rect>
232
- <rect x="23" y="69" width="23" height="23" fill="black"></rect>
233
- </svg>
234
  <h1 style="font-weight: 900; margin-bottom: 7px;">
235
- Gina the cat (Stable Diffusion v1-5 fine-tuned)
236
  </h1>
237
  </div>
238
  <p style="margin-bottom: 10px; font-size: 94%">
@@ -256,7 +225,7 @@ with block:
256
  rounded=(True, False, False, True),
257
  container=False,
258
  )
259
- btn = gr.Button("Generate a Gina photo").style(
260
  margin=False,
261
  rounded=(False, True, True, False),
262
  full_width=False,
 
20
  pipe = StableDiffusionPipeline.from_pretrained(
21
  model_id,
22
  use_auth_token=AUTH_TOKEN,
23
+ torch_dtype=torch.float16,
24
  )
25
  else:
26
  print('No Nvidia GPU in system!')
 
33
  pipe.safety_checker = dummy
34
  #torch.backends.cudnn.benchmark = True
35
 
36
+ def infer(prompt="", samples=4, steps=50, scale=7.5, seed=34354):
37
  generator = torch.Generator(device=device).manual_seed(seed)
38
  return pipe(
39
  [prompt] * samples,
 
197
  align-items: center;
198
  gap: 0.8rem;
199
  font-size: 1.75rem;
200
+ margin-top: 3px;
201
  "
202
  >
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  <h1 style="font-weight: 900; margin-bottom: 7px;">
204
+ 😻 Gina the cat (Stable Diffusion v1-5 fine-tuned)
205
  </h1>
206
  </div>
207
  <p style="margin-bottom: 10px; font-size: 94%">
 
225
  rounded=(True, False, False, True),
226
  container=False,
227
  )
228
+ btn = gr.Button("Generate a Gina!").style(
229
  margin=False,
230
  rounded=(False, True, True, False),
231
  full_width=False,