greendra commited on
Commit
2b5053c
·
verified ·
1 Parent(s): cad2495

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -70,14 +70,13 @@ def query(prompt, negative_prompt, steps=4, cfg_scale=0, seed=-1, width=1024, he
70
  # Prepare payload for API call
71
  payload = {
72
  "inputs": final_prompt,
73
- "negative_prompt": negative_prompt,
74
- "num_inference_steps": steps,
75
- "guidance_scale": cfg_scale, # API often uses guidance_scale
76
- "seed": seed if seed != -1 else random.randint(1, 1000000000),
77
  "parameters": { # Nested parameters as per original structure
78
  "width": width,
79
  "height": height,
80
  "num_inference_steps": steps,
 
 
 
81
  }
82
  # Add other parameters here if needed (e.g., sampler if supported)
83
  }
 
70
  # Prepare payload for API call
71
  payload = {
72
  "inputs": final_prompt,
 
 
 
 
73
  "parameters": { # Nested parameters as per original structure
74
  "width": width,
75
  "height": height,
76
  "num_inference_steps": steps,
77
+ "negative_prompt": negative_prompt,
78
+ "guidance_scale": cfg_scale,
79
+ "seed": seed if seed != -1 else random.randint(1, 1000000000),
80
  }
81
  # Add other parameters here if needed (e.g., sampler if supported)
82
  }