greendra commited on
Commit
f869ea1
·
verified ·
1 Parent(s): 7abf720

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -63,17 +63,14 @@ def query(prompt, negative_prompt="", steps=30, cfg_scale=7, seed=-1, width=1024
63
  # Prepare the payload for the API call
64
  payload = {
65
  "inputs": final_prompt,
66
- "negative_prompt": negative_prompt, # Assuming API accepts negative_prompt
67
- "steps": steps,
68
- "guidance_scale": cfg_scale, # API often uses guidance_scale
69
- "seed": seed if seed != -1 else random.randint(1, 1000000000),
70
  "parameters": {
 
 
 
 
71
  "width": width,
72
  "height": height,
73
- # If the API supports other params like 'steps', 'guidance_scale', they might belong here or top-level
74
  }
75
- # Removed 'is_negative' as negative_prompt is usually passed directly
76
- # Removed 'strength' and 'sampler' as they weren't in the target API structure
77
  }
78
 
79
  # API Call Section
 
63
  # Prepare the payload for the API call
64
  payload = {
65
  "inputs": final_prompt,
 
 
 
 
66
  "parameters": {
67
+ "negative_prompt": negative_prompt,
68
+ "num_inference_steps": steps,
69
+ "guidance_scale": cfg_scale,
70
+ "seed": seed if seed != -1 else random.randint(1, 1000000000),
71
  "width": width,
72
  "height": height,
 
73
  }
 
 
74
  }
75
 
76
  # API Call Section