Spaces:
Running
Running
lalashechka
commited on
Commit
•
9bfa07c
1
Parent(s):
7dd17d6
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
37 |
print('n_1')
|
38 |
with closing(create_connection(f"{url_sd3}", timeout=60)) as conn:
|
39 |
conn.send('{"fn_index":3,"session_hash":""}')
|
40 |
-
conn.send(f'{{"data":["{
|
41 |
while True:
|
42 |
status = json.loads(conn.recv())['msg']
|
43 |
print(status)
|
@@ -50,7 +50,7 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
50 |
photo = Image.open(io.BytesIO(base64.decodebytes(bytes(photo, "utf-8"))))
|
51 |
return photo
|
52 |
except:
|
53 |
-
print(n_2)
|
54 |
if task == 'Stable Diffusion XL 1.0':
|
55 |
model = 'sd_xl_base_1.0'
|
56 |
if task == 'Crystal Clear XL':
|
|
|
37 |
print('n_1')
|
38 |
with closing(create_connection(f"{url_sd3}", timeout=60)) as conn:
|
39 |
conn.send('{"fn_index":3,"session_hash":""}')
|
40 |
+
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":""}}')
|
41 |
while True:
|
42 |
status = json.loads(conn.recv())['msg']
|
43 |
print(status)
|
|
|
50 |
photo = Image.open(io.BytesIO(base64.decodebytes(bytes(photo, "utf-8"))))
|
51 |
return photo
|
52 |
except:
|
53 |
+
print("n_2")
|
54 |
if task == 'Stable Diffusion XL 1.0':
|
55 |
model = 'sd_xl_base_1.0'
|
56 |
if task == 'Crystal Clear XL':
|