CultriX commited on
Commit
873386d
1 Parent(s): 63731aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -20,7 +20,6 @@ MAX_IMAGE_SIZE = 2048
20
 
21
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
22
 
23
- # History to keep track of generated images and their parameters
24
  history = []
25
 
26
  @spaces.GPU(duration=75)
@@ -39,7 +38,6 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidan
39
  output_type="pil",
40
  good_vae=good_vae,
41
  ):
42
- # Save to history
43
  history.append((img, prompt, seed, width, height, guidance_scale, num_inference_steps))
44
  yield img, seed
45
 
@@ -126,7 +124,6 @@ with gr.Blocks(css=css) as demo:
126
  cache_examples="lazy"
127
  )
128
 
129
- # History button to display previous images and parameters
130
  def show_history():
131
  return [(img, f"Prompt: {p}, Seed: {s}, Width: {w}, Height: {h}, Guidance Scale: {g}, Steps: {n}") for img, p, s, w, h, g, n in history]
132
 
@@ -142,4 +139,4 @@ with gr.Blocks(css=css) as demo:
142
  outputs=[result, seed]
143
  )
144
 
145
- demo.launch()
 
20
 
21
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
22
 
 
23
  history = []
24
 
25
  @spaces.GPU(duration=75)
 
38
  output_type="pil",
39
  good_vae=good_vae,
40
  ):
 
41
  history.append((img, prompt, seed, width, height, guidance_scale, num_inference_steps))
42
  yield img, seed
43
 
 
124
  cache_examples="lazy"
125
  )
126
 
 
127
  def show_history():
128
  return [(img, f"Prompt: {p}, Seed: {s}, Width: {w}, Height: {h}, Guidance Scale: {g}, Steps: {n}") for img, p, s, w, h, g, n in history]
129
 
 
139
  outputs=[result, seed]
140
  )
141
 
142
+ demo.launch()