Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ from fastapi import FastAPI
|
|
21 |
app = FastAPI()
|
22 |
|
23 |
|
24 |
-
def query(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed, width
|
25 |
result = {"prompt": prompt,"negative_prompt": negative_prompt,"task": task,"steps": steps,"sampler": sampler,"cfg_scale": cfg_scale,"seed": seed, "width": width, "height": height}
|
26 |
print(result)
|
27 |
try:
|
@@ -113,7 +113,7 @@ def query(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed, width=
|
|
113 |
'user-agent': f'{ua.random}'
|
114 |
}
|
115 |
client = Client("Nymbo/SD-XL", headers=headers)
|
116 |
-
result = client.predict(prompt,negative_prompt,"","",True,False,False,0,
|
117 |
return result
|
118 |
except:
|
119 |
try:
|
@@ -169,7 +169,7 @@ def mirror(image_output, scale_by, method, gfpgan, codeformer):
|
|
169 |
encoded_string2 = str(encoded_string2).replace("b'", '')
|
170 |
|
171 |
encoded_string2 = "data:image/png;base64," + encoded_string2
|
172 |
-
data = {"fn_index":81,"data":[0,0,encoded_string2,None,"","",True,gfpgan,codeformer,0,scale_by,
|
173 |
r = requests.post(url_up, json=data, timeout=100)
|
174 |
print(r.text)
|
175 |
print(r.json()['data'][0][0]['name'])
|
|
|
21 |
app = FastAPI()
|
22 |
|
23 |
|
24 |
+
def query(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed, width, height):
|
25 |
result = {"prompt": prompt,"negative_prompt": negative_prompt,"task": task,"steps": steps,"sampler": sampler,"cfg_scale": cfg_scale,"seed": seed, "width": width, "height": height}
|
26 |
print(result)
|
27 |
try:
|
|
|
113 |
'user-agent': f'{ua.random}'
|
114 |
}
|
115 |
client = Client("Nymbo/SD-XL", headers=headers)
|
116 |
+
result = client.predict(prompt,negative_prompt,"","",True,False,False,0,896,1152,7,1,25,25,False,api_name="/run")
|
117 |
return result
|
118 |
except:
|
119 |
try:
|
|
|
169 |
encoded_string2 = str(encoded_string2).replace("b'", '')
|
170 |
|
171 |
encoded_string2 = "data:image/png;base64," + encoded_string2
|
172 |
+
data = {"fn_index":81,"data":[0,0,encoded_string2,None,"","",True,gfpgan,codeformer,0,scale_by,896,1152,None,method,"None",1,False,[],"",""],"session_hash":""}
|
173 |
r = requests.post(url_up, json=data, timeout=100)
|
174 |
print(r.text)
|
175 |
print(r.json()['data'][0][0]['name'])
|