Spaces:
Runtime error
Runtime error
clementchadebec
commited on
Commit
•
b7c8c25
1
Parent(s):
3811063
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
46 |
MAX_IMAGE_SIZE = 1024
|
47 |
NUM_INFERENCE_STEPS = 4
|
48 |
|
49 |
-
def infer(prompt, seed, randomize_seed
|
50 |
|
51 |
if randomize_seed:
|
52 |
seed = random.randint(0, MAX_SEED)
|
@@ -56,7 +56,7 @@ def infer(prompt, seed, randomize_seed, num_inference_steps):
|
|
56 |
image = pipe(
|
57 |
prompt = prompt,
|
58 |
guidance_scale = 0,
|
59 |
-
num_inference_steps =
|
60 |
generator = generator
|
61 |
).images[0]
|
62 |
|
@@ -124,7 +124,7 @@ with gr.Blocks(css=css) as demo:
|
|
124 |
|
125 |
run_button.click(
|
126 |
fn = infer,
|
127 |
-
inputs = [prompt, seed, randomize_seed
|
128 |
outputs = [result]
|
129 |
)
|
130 |
|
|
|
46 |
MAX_IMAGE_SIZE = 1024
|
47 |
NUM_INFERENCE_STEPS = 4
|
48 |
|
49 |
+
def infer(prompt, seed, randomize_seed):
|
50 |
|
51 |
if randomize_seed:
|
52 |
seed = random.randint(0, MAX_SEED)
|
|
|
56 |
image = pipe(
|
57 |
prompt = prompt,
|
58 |
guidance_scale = 0,
|
59 |
+
num_inference_steps = NUM_INFERENCE_STEPS,
|
60 |
generator = generator
|
61 |
).images[0]
|
62 |
|
|
|
124 |
|
125 |
run_button.click(
|
126 |
fn = infer,
|
127 |
+
inputs = [prompt, seed, randomize_seed],
|
128 |
outputs = [result]
|
129 |
)
|
130 |
|