tejani commited on
Commit
2c50913
·
verified ·
1 Parent(s): 3ef8c1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -14,25 +14,25 @@ MAX_IMAGE_SIZE = 1024
14
 
15
  def infer(
16
  prompt,
17
- negative_prompt, # May not be supported
18
- seed, # May not be supported
19
  randomize_seed,
20
- width, # May not be supported
21
- height, # May not be supported
22
- guidance_scale, # May not be supported
23
- num_inference_steps, # May not be supported
24
  progress=gr.Progress(track_tqdm=True),
25
  ):
26
  if randomize_seed:
27
  seed = random.randint(0, MAX_SEED)
28
 
29
- # Minimal call to the interface with just the prompt
30
- # Add other parameters only if the model supports them
31
- image = interface(prompt=prompt)
32
 
33
- # If the model supports additional parameters, you can uncomment and test:
34
  # image = interface(
35
- # prompt=prompt,
36
  # negative_prompt=negative_prompt if negative_prompt else None,
37
  # seed=seed,
38
  # width=width,
 
14
 
15
  def infer(
16
  prompt,
17
+ negative_prompt,
18
+ seed,
19
  randomize_seed,
20
+ width,
21
+ height,
22
+ guidance_scale,
23
+ num_inference_steps,
24
  progress=gr.Progress(track_tqdm=True),
25
  ):
26
  if randomize_seed:
27
  seed = random.randint(0, MAX_SEED)
28
 
29
+ # Call the interface with the correct key ("inputs" instead of "prompt")
30
+ # Start with minimal parameters and add others if supported
31
+ image = interface(inputs=prompt)
32
 
33
+ # If the model supports additional parameters, you can extend this:
34
  # image = interface(
35
+ # inputs=prompt,
36
  # negative_prompt=negative_prompt if negative_prompt else None,
37
  # seed=seed,
38
  # width=width,