Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
15 |
timeout = 50000 # タイムアウトを300秒に設定
|
16 |
|
17 |
# Function to query the API and return the generated image
|
18 |
-
def query(prompt, negative_prompt="", steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024, num_inference_steps=30, guidance_scale=7.5, num_return_sequences=1,
|
19 |
if not prompt:
|
20 |
return None, "Prompt is required"
|
21 |
|
@@ -42,7 +42,6 @@ def query(prompt, negative_prompt="", steps=35, cfg_scale=7, sampler="DPM++ 2M K
|
|
42 |
"height": height,
|
43 |
"num_inference_steps": num_inference_steps,
|
44 |
"guidance_scale": guidance_scale,
|
45 |
-
"temperature": temperature,
|
46 |
"top_k": top_k,
|
47 |
"top_p": top_p,
|
48 |
"eta": eta
|
@@ -107,8 +106,6 @@ def generate_image():
|
|
107 |
height = int(request.args.get("height", 1024))
|
108 |
num_inference_steps = int(request.args.get("num_inference_steps", 30))
|
109 |
guidance_scale = float(request.args.get("guidance_scale", 7.5))
|
110 |
-
num_return_sequences = int(request.args.get("num_return_sequences", 1))
|
111 |
-
temperature = float(request.args.get("temperature", 1.0))
|
112 |
top_k = int(request.args.get("top_k", 50))
|
113 |
top_p = float(request.args.get("top_p", 0.9))
|
114 |
eta = float(request.args.get("eta", 0.1))
|
|
|
15 |
timeout = 50000 # タイムアウトを300秒に設定
|
16 |
|
17 |
# Function to query the API and return the generated image
|
18 |
+
def query(prompt, negative_prompt="", steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024, num_inference_steps=30, guidance_scale=7.5, num_return_sequences=1, top_k=50, top_p=0.9, eta=0.1):
|
19 |
if not prompt:
|
20 |
return None, "Prompt is required"
|
21 |
|
|
|
42 |
"height": height,
|
43 |
"num_inference_steps": num_inference_steps,
|
44 |
"guidance_scale": guidance_scale,
|
|
|
45 |
"top_k": top_k,
|
46 |
"top_p": top_p,
|
47 |
"eta": eta
|
|
|
106 |
height = int(request.args.get("height", 1024))
|
107 |
num_inference_steps = int(request.args.get("num_inference_steps", 30))
|
108 |
guidance_scale = float(request.args.get("guidance_scale", 7.5))
|
|
|
|
|
109 |
top_k = int(request.args.get("top_k", 50))
|
110 |
top_p = float(request.args.get("top_p", 0.9))
|
111 |
eta = float(request.args.get("eta", 0.1))
|