dolbohren commited on
Commit
f6b61fd
·
verified ·
1 Parent(s): 606f45b

Update app.py

Browse files

A model_id parameter is added to infer function.

Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -23,14 +23,15 @@ MAX_IMAGE_SIZE = 1024
23
 
24
  # @spaces.GPU #[uncomment to use ZeroGPU]
25
  def infer(
26
- prompt,
27
- negative_prompt,
28
- seed,
 
29
  randomize_seed,
30
  width,
31
  height,
32
- guidance_scale,
33
- num_inference_steps,
34
  progress=gr.Progress(track_tqdm=True),
35
  ):
36
  if randomize_seed:
 
23
 
24
  # @spaces.GPU #[uncomment to use ZeroGPU]
25
  def infer(
26
+ model_id: Optional[str] = "CompVis/stable-diffusion-v1-4",
27
+ prompt: str,
28
+ negative_prompt=gr.Text(…),
29
+ seed: Optional[int] = 42,
30
  randomize_seed,
31
  width,
32
  height,
33
+ guidance_scale: Optional[float] = 7,
34
+ num_inference_steps: Optional[int] = 20,
35
  progress=gr.Progress(track_tqdm=True),
36
  ):
37
  if randomize_seed: