Spaces:
Running
Running
lalashechka
commited on
Commit
•
f43caa4
1
Parent(s):
750ef61
Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
77 |
return photo
|
78 |
|
79 |
try:
|
80 |
-
with closing(create_connection(f"{url_sd3}"
|
81 |
conn.send('{"fn_index":3,"session_hash":""}')
|
82 |
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":""}}')
|
83 |
c = 0
|
@@ -100,8 +100,9 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
100 |
#file_name = response.json()['image']['file_name']
|
101 |
#photo = f"{url_sd6}{file_name}.png"
|
102 |
#return photo
|
103 |
-
except:
|
104 |
-
|
|
|
105 |
conn.send('{"fn_index":0,"session_hash":""}')
|
106 |
conn.send(f'{{"data":["{prompt}","[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry","dreamshaperXL10_alpha2.safetensors [c8afe2ef]",30,"DPM++ 2M Karras",7,1024,1024,-1],"event_data":null,"fn_index":0,"session_hash":""}}')
|
107 |
conn.recv()
|
|
|
77 |
return photo
|
78 |
|
79 |
try:
|
80 |
+
with closing(create_connection(f"{url_sd3}")) as conn:
|
81 |
conn.send('{"fn_index":3,"session_hash":""}')
|
82 |
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":""}}')
|
83 |
c = 0
|
|
|
100 |
#file_name = response.json()['image']['file_name']
|
101 |
#photo = f"{url_sd6}{file_name}.png"
|
102 |
#return photo
|
103 |
+
except Exception as e:
|
104 |
+
print("e: --> ",e)
|
105 |
+
with closing(create_connection(f"{url_sd4}")) as conn:
|
106 |
conn.send('{"fn_index":0,"session_hash":""}')
|
107 |
conn.send(f'{{"data":["{prompt}","[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry","dreamshaperXL10_alpha2.safetensors [c8afe2ef]",30,"DPM++ 2M Karras",7,1024,1024,-1],"event_data":null,"fn_index":0,"session_hash":""}}')
|
108 |
conn.recv()
|