Yaron Koresh commited on
Commit
f1ff643
·
verified ·
1 Parent(s): 8fc171e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -542,6 +542,8 @@ def upscaler(
542
  log(f'CALL upscaler')
543
 
544
  global working
 
 
545
 
546
  if not working:
547
 
@@ -632,6 +634,8 @@ def generate_random_string(length):
632
  def add_song_cover_text(img,top_title=None,bottom_title=None):
633
 
634
  global working
 
 
635
 
636
  if not working:
637
 
@@ -1291,6 +1295,8 @@ def handle_generation(h,w,d):
1291
  log(f'CALL handle_generate')
1292
 
1293
  global working
 
 
1294
 
1295
  if not working:
1296
 
@@ -1331,7 +1337,7 @@ def handle_generation(h,w,d):
1331
  output_type="pil",
1332
  guidance_scale=img_accu,
1333
  num_images_per_prompt=1,
1334
- num_inference_steps=image_steps,
1335
  max_sequence_length=seq,
1336
  generator=torch.Generator(device).manual_seed(random.randint(0, MAX_SEED))
1337
  ).images[0]
 
542
  log(f'CALL upscaler')
543
 
544
  global working
545
+ global _HEIGHT_
546
+ global _WIDTH_
547
 
548
  if not working:
549
 
 
634
  def add_song_cover_text(img,top_title=None,bottom_title=None):
635
 
636
  global working
637
+ global _HEIGHT_
638
+ global _WIDTH_
639
 
640
  if not working:
641
 
 
1295
  log(f'CALL handle_generate')
1296
 
1297
  global working
1298
+ global _HEIGHT_
1299
+ global _WIDTH_
1300
 
1301
  if not working:
1302
 
 
1337
  output_type="pil",
1338
  guidance_scale=img_accu,
1339
  num_images_per_prompt=1,
1340
+ num_inference_steps=50,
1341
  max_sequence_length=seq,
1342
  generator=torch.Generator(device).manual_seed(random.randint(0, MAX_SEED))
1343
  ).images[0]