Spaces:
Running
Running
lalashechka
commited on
Commit
•
8c6bc0c
1
Parent(s):
3f028f9
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
80 |
return photo
|
81 |
|
82 |
try:
|
83 |
-
with closing(create_connection(f"{url_sd3}")) as conn:
|
84 |
conn.send('{"fn_index":3,"session_hash":""}')
|
85 |
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":""}}')
|
86 |
c = 0
|
@@ -97,7 +97,7 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
97 |
photo = Image.open(io.BytesIO(base64.decodebytes(bytes(photo, "utf-8"))))
|
98 |
return photo
|
99 |
except:
|
100 |
-
with closing(create_connection(f"{url_sd4}")) as conn:
|
101 |
conn.send('{"fn_index":0,"session_hash":""}')
|
102 |
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":""}}')
|
103 |
conn.recv()
|
|
|
80 |
return photo
|
81 |
|
82 |
try:
|
83 |
+
with closing(create_connection(f"{url_sd3}", timeout=30)) as conn:
|
84 |
conn.send('{"fn_index":3,"session_hash":""}')
|
85 |
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":""}}')
|
86 |
c = 0
|
|
|
97 |
photo = Image.open(io.BytesIO(base64.decodebytes(bytes(photo, "utf-8"))))
|
98 |
return photo
|
99 |
except:
|
100 |
+
with closing(create_connection(f"{url_sd4}", timeout=30)) as conn:
|
101 |
conn.send('{"fn_index":0,"session_hash":""}')
|
102 |
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":""}}')
|
103 |
conn.recv()
|