Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -119,16 +119,19 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
|
|
119 |
|
120 |
payload = {
|
121 |
"inputs": prompt,
|
122 |
-
"
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
131 |
}
|
|
|
132 |
|
133 |
response = requests.post(f"{api_base}{API_URL}", headers=headers, json=payload, timeout=timeout)
|
134 |
if response.status_code != 200:
|
|
|
119 |
|
120 |
payload = {
|
121 |
"inputs": prompt,
|
122 |
+
"parameters": {
|
123 |
+
"target_size": {
|
124 |
+
"width": width,
|
125 |
+
"height": height,
|
126 |
+
},
|
127 |
+
"guidance_scale": cfg_scale,
|
128 |
+
"seed": seed if seed != -1 else random.randint(1, 999999),
|
129 |
+
"guidance_scale": cfg_scale,
|
130 |
+
"num_inference_steps": steps,
|
131 |
+
"negative_prompt": is_negative,
|
132 |
+
"scheduler": sampler
|
133 |
}
|
134 |
+
}
|
135 |
|
136 |
response = requests.post(f"{api_base}{API_URL}", headers=headers, json=payload, timeout=timeout)
|
137 |
if response.status_code != 200:
|