Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,10 +46,10 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
46 |
|
47 |
@spaces.GPU
|
48 |
def run(prompt="a photo of an astronaut riding a horse on mars",
|
49 |
-
steps=10,
|
50 |
-
seed=20,
|
51 |
negative_prompt="",
|
|
|
52 |
randomize_seed=False,
|
|
|
53 |
progress=gr.Progress(track_tqdm=True)
|
54 |
):
|
55 |
if randomize_seed:
|
@@ -60,6 +60,7 @@ def run(prompt="a photo of an astronaut riding a horse on mars",
|
|
60 |
ays_images = pipe(
|
61 |
prompt,
|
62 |
negative_prompt=negative_prompt,
|
|
|
63 |
num_images_per_prompt=1,
|
64 |
timesteps=sampling_schedule,
|
65 |
).images
|
@@ -129,7 +130,7 @@ with gr.Blocks(css=css) as demo:
|
|
129 |
gr.on(
|
130 |
[run_button.click, prompt.submit, negative_prompt.submit],
|
131 |
fn = run,
|
132 |
-
inputs = [prompt,
|
133 |
outputs = [result, seed]
|
134 |
)
|
135 |
|
|
|
46 |
|
47 |
@spaces.GPU
|
48 |
def run(prompt="a photo of an astronaut riding a horse on mars",
|
|
|
|
|
49 |
negative_prompt="",
|
50 |
+
num_inference_steps=10,
|
51 |
randomize_seed=False,
|
52 |
+
seed=20,
|
53 |
progress=gr.Progress(track_tqdm=True)
|
54 |
):
|
55 |
if randomize_seed:
|
|
|
60 |
ays_images = pipe(
|
61 |
prompt,
|
62 |
negative_prompt=negative_prompt,
|
63 |
+
num_inference_steps=num_inference_steps,
|
64 |
num_images_per_prompt=1,
|
65 |
timesteps=sampling_schedule,
|
66 |
).images
|
|
|
130 |
gr.on(
|
131 |
[run_button.click, prompt.submit, negative_prompt.submit],
|
132 |
fn = run,
|
133 |
+
inputs = [prompt, negative_prompt, num_inference_steps, randomize_seed, seed],
|
134 |
outputs = [result, seed]
|
135 |
)
|
136 |
|