Spaces:
Runtime error
Runtime error
clementrof
commited on
Commit
•
42ce8e5
1
Parent(s):
fe27883
Update app3.py
Browse files
app3.py
CHANGED
@@ -53,33 +53,33 @@ def SD_call(prompt, image_prompt, age, weight, w_w, color, hair_color,h_c_w, ha
|
|
53 |
# Define your data (this could also be a JSON payload)
|
54 |
print("SD_processing")
|
55 |
data = {
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
60 |
},
|
61 |
-
"
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
"width": 520,
|
76 |
-
"height": 520,
|
77 |
-
"sampler_name": "DPM++ SDE Karras",
|
78 |
-
"sampler_index": "DPM++ SDE Karras",
|
79 |
-
"restore_faces": False
|
80 |
-
}
|
81 |
}
|
82 |
}
|
|
|
83 |
|
84 |
# data = {
|
85 |
# "input": {
|
@@ -177,4 +177,4 @@ demo = gr.Interface(
|
|
177 |
outputs=[gr.Image(label="Generated Image", type="filepath")],
|
178 |
)
|
179 |
|
180 |
-
demo.launch(share=True)
|
|
|
53 |
# Define your data (this could also be a JSON payload)
|
54 |
print("SD_processing")
|
55 |
data = {
|
56 |
+
"input": {
|
57 |
+
"api": {
|
58 |
+
"method": "POST",
|
59 |
+
"endpoint": "/sdapi/v1/txt2img"
|
60 |
+
},
|
61 |
+
"payload": {
|
62 |
+
"override_settings": {
|
63 |
+
"sd_model_checkpoint": "CyberRealistic",
|
64 |
+
"sd_vae": ""
|
65 |
},
|
66 |
+
"override_settings_restore_afterwards": True,
|
67 |
+
"refiner_checkpoint": "",
|
68 |
+
"refiner_switch_at": 0.8,
|
69 |
+
"prompt": f"{total_prompt}, {positive}",
|
70 |
+
"negative_prompt": f"EasyNegative, fat, paintings, sketches, lowres, ((monochrome)), ((grayscale)), bad anatomy, text, error, cropped, signature, watermark, username, blurry, bad feet, poorly drawn face, bad proportions, gross proportions, ng_deepnegative_v1_75t, badhandsv5-neg, {negative}",
|
71 |
+
"seed": -1,
|
72 |
+
"batch_size": 1,
|
73 |
+
"steps": 30,
|
74 |
+
"cfg_scale": 7,
|
75 |
+
"width": 520,
|
76 |
+
"height": 520,
|
77 |
+
"sampler_name": "DPM++ SDE Karras",
|
78 |
+
"sampler_index": "DPM++ SDE Karras",
|
79 |
+
"restore_faces": False
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
}
|
82 |
+
}
|
83 |
|
84 |
# data = {
|
85 |
# "input": {
|
|
|
177 |
outputs=[gr.Image(label="Generated Image", type="filepath")],
|
178 |
)
|
179 |
|
180 |
+
demo.launch(share=True)
|