vilarin commited on
Commit
888c470
·
verified ·
1 Parent(s): 206dcd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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 randomize_seed:
126
- seed = random.randint(0, MAX_SEED)
127
- generator = torch.Generator("cpu").manual_seed(seed)
128
 
129
  result = pipe(
130
- prompt=inpaint_prompt,
131
  image=image,
132
  mask_image=mask_image,
133
  width=fix_width,
134
  height=fix_height,
135
- num_inference_steps=num_steps,
136
  generator=generator,
137
- guidance_scale=guidance,
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