Spaces:
Sleeping
Sleeping
Update app.py
Browse filesA model_id parameter is added to infer function.
app.py
CHANGED
|
@@ -23,14 +23,15 @@ MAX_IMAGE_SIZE = 1024
|
|
| 23 |
|
| 24 |
# @spaces.GPU #[uncomment to use ZeroGPU]
|
| 25 |
def infer(
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
| 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:
|