Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,10 +21,10 @@ pipe.to(device)
|
|
| 21 |
|
| 22 |
gallery = gr.Gallery(label="Generated image", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
|
| 23 |
|
| 24 |
-
def infer(prompt):
|
| 25 |
|
| 26 |
#image = pipe(prompt, init_image=init_image)["sample"][0]
|
| 27 |
-
images_list = pipe([prompt], num_inference_steps=
|
| 28 |
images = []
|
| 29 |
safe_image = Image.open(r"unsafe.png")
|
| 30 |
for i, image in enumerate(images_list["images"]):
|
|
|
|
| 21 |
|
| 22 |
gallery = gr.Gallery(label="Generated image", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
|
| 23 |
|
| 24 |
+
def infer(prompt, steps=21):
|
| 25 |
|
| 26 |
#image = pipe(prompt, init_image=init_image)["sample"][0]
|
| 27 |
+
images_list = pipe([prompt], num_inference_steps=steps)
|
| 28 |
images = []
|
| 29 |
safe_image = Image.open(r"unsafe.png")
|
| 30 |
for i, image in enumerate(images_list["images"]):
|