Muhammad Saqib
commited on
Commit
•
10460dc
1
Parent(s):
3bcde99
Update modules/app.py
Browse files- modules/app.py +15 -15
modules/app.py
CHANGED
@@ -165,20 +165,20 @@ async def img2location(request: Request):
|
|
165 |
@app.post("/pixart-sigma", dependencies=[Depends(verify_user_agent)])
|
166 |
async def pixart_sigma(request: Request):
|
167 |
request_json = await request.json()
|
168 |
-
prompt =
|
169 |
-
negative_prompt =
|
170 |
-
style =
|
171 |
-
use_negative_prompt =
|
172 |
-
num_imgs =
|
173 |
-
seed =
|
174 |
-
width =
|
175 |
-
height =
|
176 |
-
schedule =
|
177 |
-
dpms_guidance_scale =
|
178 |
-
sas_guidance_scale =
|
179 |
-
dpms_inference_steps =
|
180 |
-
sas_inference_steps =
|
181 |
-
randomize_seed =
|
182 |
|
183 |
hash = generate_hash()
|
184 |
|
@@ -205,7 +205,7 @@ async def pixart_sigma(request: Request):
|
|
205 |
sas_guidance_scale,
|
206 |
dpms_inference_steps,
|
207 |
sas_inference_steps,
|
208 |
-
|
209 |
],
|
210 |
'event_data': None,
|
211 |
'fn_index': 3,
|
|
|
165 |
@app.post("/pixart-sigma", dependencies=[Depends(verify_user_agent)])
|
166 |
async def pixart_sigma(request: Request):
|
167 |
request_json = await request.json()
|
168 |
+
prompt = request_json.get("prompt", None)
|
169 |
+
negative_prompt = request_json.get("negative_prompt", "")
|
170 |
+
style = request_json.get("style", "(No style)")
|
171 |
+
use_negative_prompt = request_json.get("use_negative_prompt", True)
|
172 |
+
num_imgs = request_json.get("num_imgs", 1)
|
173 |
+
seed = request_json.get("seed", 0)
|
174 |
+
width = request_json.get("width", 1024)
|
175 |
+
height = request_json.get("height", 1024)
|
176 |
+
schedule = request_json.get("schedule", "DPM-Solver")
|
177 |
+
dpms_guidance_scale = request_json.get("dpms_guidance_scale", 4.5)
|
178 |
+
sas_guidance_scale = request_json.get("sas_guidance_scale", 3)
|
179 |
+
dpms_inference_steps = request_json.get("dpms_inference_steps", 14)
|
180 |
+
sas_inference_steps = request_json.get("sas_inference_steps", 25)
|
181 |
+
randomize_seed = request_json.get("randomize_seed", True)
|
182 |
|
183 |
hash = generate_hash()
|
184 |
|
|
|
205 |
sas_guidance_scale,
|
206 |
dpms_inference_steps,
|
207 |
sas_inference_steps,
|
208 |
+
True,
|
209 |
],
|
210 |
'event_data': None,
|
211 |
'fn_index': 3,
|