lalashechka commited on
Commit
a1c524c
1 Parent(s): 6f45ea3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -74,9 +74,12 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
74
  with closing(create_connection(f"{url_sd3}", timeout=60)) as conn:
75
  conn.send('{"fn_index":3,"session_hash":""}')
76
  conn.send(f'{{"data":["{prompt}, 4k photo","[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry",7.5,"(No style)"],"event_data":null,"fn_index":3,"session_hash":""}}')
77
- while True:
 
78
  status = json.loads(conn.recv())['msg']
79
  if status == 'estimation':
 
 
80
  continue
81
  if status == 'process_starts':
82
  break
 
74
  with closing(create_connection(f"{url_sd3}", timeout=60)) as conn:
75
  conn.send('{"fn_index":3,"session_hash":""}')
76
  conn.send(f'{{"data":["{prompt}, 4k photo","[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry",7.5,"(No style)"],"event_data":null,"fn_index":3,"session_hash":""}}')
77
+ c = 0
78
+ while c < 60:
79
  status = json.loads(conn.recv())['msg']
80
  if status == 'estimation':
81
+ c += 1
82
+ time.sleep(1)
83
  continue
84
  if status == 'process_starts':
85
  break