Krebzonide commited on
Commit
34253b3
·
1 Parent(s): 9886903

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,7 +57,7 @@ def generate(prompt, neg_prompt, samp_steps, cfg_scale, batch_size, seed, height
57
  width=width,
58
  generator=torch.manual_seed(seed),
59
  ).images
60
- return [(img, f"Image {i+1}") for i, img in enumerate(images)], seed
61
 
62
  def set_base_model(base_model_id):
63
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
@@ -76,7 +76,7 @@ def set_base_model(base_model_id):
76
  return pipe
77
 
78
  def update_pixel_ratio(num1, num2):
79
- return [round(num1*num2/1048576,3), num1-(num1%8)]
80
 
81
  examples = [
82
  ['A group of 4 students from University of Wisconsin Stout sitting at a table talking, men and women, detailed faces, focused',
 
57
  width=width,
58
  generator=torch.manual_seed(seed),
59
  ).images
60
+ return {gallery: gr.update(value = [(img, f"Image {i+1}") for i, img in enumerate(images)], height=height), seed}
61
 
62
  def set_base_model(base_model_id):
63
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
 
76
  return pipe
77
 
78
  def update_pixel_ratio(num1, num2):
79
+ return [round((num1-(num1%8))*num2/1048576,3), num1-(num1%8)]
80
 
81
  examples = [
82
  ['A group of 4 students from University of Wisconsin Stout sitting at a table talking, men and women, detailed faces, focused',