fffiloni commited on
Commit
3376f6d
1 Parent(s): 93efff6

get rid of ZERO checking loop

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -19,14 +19,7 @@ def get_sdxl(prompt_in):
19
  def infer(portrait_in, prompt_in):
20
  # Generate Image from SDXL
21
  gr.Info("Generating SDXL image first ...")
22
- # Keep trying the operation until it succeeds without raising an exception
23
- while True:
24
- try:
25
- sdxl_result = get_sdxl(prompt_in)
26
- break # Exit the while loop if the operation succeeded
27
- except Exception as e:
28
- print(f"Operation failed with error: {e}")
29
- time.sleep(10) # Wait for 5 seconds before attempting again
30
 
31
  unique_id = str(uuid.uuid4())
32
 
 
19
  def infer(portrait_in, prompt_in):
20
  # Generate Image from SDXL
21
  gr.Info("Generating SDXL image first ...")
22
+ sdxl_result = get_sdxl(prompt_in)
 
 
 
 
 
 
 
23
 
24
  unique_id = str(uuid.uuid4())
25