Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -122,19 +122,19 @@ def outpaintGen(
|
|
122 |
if new_width != fix_width or new_height != fix_height:
|
123 |
mask_image = mask_image.resize((fix_width, fix_height), Image.LANCZOS)
|
124 |
|
125 |
-
if
|
126 |
-
|
127 |
-
generator = torch.Generator("cpu").manual_seed(
|
128 |
|
129 |
result = pipe(
|
130 |
-
prompt=
|
131 |
image=image,
|
132 |
mask_image=mask_image,
|
133 |
width=fix_width,
|
134 |
height=fix_height,
|
135 |
-
num_inference_steps=
|
136 |
generator=generator,
|
137 |
-
guidance_scale=
|
138 |
max_sequence_length=512,
|
139 |
).images[0]
|
140 |
|
|
|
122 |
if new_width != fix_width or new_height != fix_height:
|
123 |
mask_image = mask_image.resize((fix_width, fix_height), Image.LANCZOS)
|
124 |
|
125 |
+
if op_randomize_seed:
|
126 |
+
op_seed = random.randint(0, MAX_SEED)
|
127 |
+
generator = torch.Generator("cpu").manual_seed(op_seed)
|
128 |
|
129 |
result = pipe(
|
130 |
+
prompt=outpaint_prompt,
|
131 |
image=image,
|
132 |
mask_image=mask_image,
|
133 |
width=fix_width,
|
134 |
height=fix_height,
|
135 |
+
num_inference_steps=op_num_steps,
|
136 |
generator=generator,
|
137 |
+
guidance_scale=op_guidance,
|
138 |
max_sequence_length=512,
|
139 |
).images[0]
|
140 |
|