nyanko7 commited on
Commit
12b126f
1 Parent(s): 6e62cd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -769,7 +769,7 @@ def generate_image(
769
  model = model.to(torch_device)
770
  model_zero_init = True
771
 
772
- t = time.perf_counter()
773
  if do_img2img and init_image is not None:
774
  init_image = get_image(init_image)
775
  if resize_img:
@@ -808,7 +808,7 @@ def generate_image(
808
  x = x.clamp(-1, 1)
809
  x = rearrange(x[0], "c h w -> h w c")
810
  img = Image.fromarray((127.5 * (x + 1.0)).cpu().byte().numpy())
811
- seed += f"\nGenerated in {time.perf_counter() - t:.2f}s"
812
 
813
  return img, seed
814
 
 
769
  model = model.to(torch_device)
770
  model_zero_init = True
771
 
772
+ torg = time.perf_counter()
773
  if do_img2img and init_image is not None:
774
  init_image = get_image(init_image)
775
  if resize_img:
 
808
  x = x.clamp(-1, 1)
809
  x = rearrange(x[0], "c h w -> h w c")
810
  img = Image.fromarray((127.5 * (x + 1.0)).cpu().byte().numpy())
811
+ seed += f"\nGenerated in {time.perf_counter() - torg:.2f}s"
812
 
813
  return img, seed
814