tombetthauser commited on
Commit
cffda6e
β€’
1 Parent(s): 1b101d7

Fix image_count error

Browse files

error was referenced before assigned?

Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -131,12 +131,13 @@ def image_prompt(prompt, guidance, steps, seed, height, width):
131
  height=int((height // 8) * 8)
132
  width=int((width // 8) * 8)
133
 
134
- image_count += 1
135
  curr_time = datetime.datetime.now()
136
 
137
  print("----- advanced tab prompt ------------------------------")
138
  print(f"prompt: {prompt}, size: {width}px x {height}px, guidance: {guidance}, steps: {steps}, seed: {int(seed)}")
139
- print(f"image_count: {image_count}, datetime: `{e}`")
 
140
  print("-------------------------------------------------------")
141
 
142
  return (
@@ -278,12 +279,13 @@ def simple_image_prompt(prompt, dropdown, size_dropdown):
278
  prompt = prompt + DROPDOWNS[dropdown]
279
  generator = torch.Generator(device="cuda").manual_seed(int(seed))
280
 
281
- image_count += 1
282
  curr_time = datetime.datetime.now()
283
 
284
  print("----- welcome / beta tab prompt ------------------------------")
285
  print(f"prompt: {prompt}, size: {width}px x {height}px, guidance: {guidance}, steps: {steps}, seed: {int(seed)}")
286
- print(f"image_count: {image_count}, datetime: `{e}`")
 
287
  print("-------------------------------------------------------")
288
 
289
  return (
 
131
  height=int((height // 8) * 8)
132
  width=int((width // 8) * 8)
133
 
134
+ # image_count += 1
135
  curr_time = datetime.datetime.now()
136
 
137
  print("----- advanced tab prompt ------------------------------")
138
  print(f"prompt: {prompt}, size: {width}px x {height}px, guidance: {guidance}, steps: {steps}, seed: {int(seed)}")
139
+ # print(f"image_count: {image_count}, datetime: `{e}`")
140
+ print(f"datetime: `{e}`")
141
  print("-------------------------------------------------------")
142
 
143
  return (
 
279
  prompt = prompt + DROPDOWNS[dropdown]
280
  generator = torch.Generator(device="cuda").manual_seed(int(seed))
281
 
282
+ # image_count += 1
283
  curr_time = datetime.datetime.now()
284
 
285
  print("----- welcome / beta tab prompt ------------------------------")
286
  print(f"prompt: {prompt}, size: {width}px x {height}px, guidance: {guidance}, steps: {steps}, seed: {int(seed)}")
287
+ # print(f"image_count: {image_count}, datetime: `{e}`")
288
+ print(f"datetime: `{e}`")
289
  print("-------------------------------------------------------")
290
 
291
  return (