Skip to content

Commit

Permalink
update sketch_inpaint examples
Browse files Browse the repository at this point in the history
  • Loading branch information
noskill committed Apr 19, 2024
1 parent d9e9e24 commit cff49f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions examples/sketch_inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ def main():
scheduler = "EulerAncestralDiscreteScheduler" # gives good results

pipe = MaskedIm2ImPipe(model_dir+model_id)
pipe.setup(original_image=img, image_painted=img_paint, strength=0.75,
pipe.setup(original_image=img, image_painted=img_paint, strength=0.85,
scheduler=scheduler, guidance_scale=7, clip_skip=3, blur=blur)

prompt = "a man wearing a mask"
gs = GenSession("./masked_im2im", pipe, Cfgen(prompt, "", seeds=range(10)))
gs.gen_sess(add_count=10)
init = 84958344
count = 10
gs = GenSession("./masked_im2im", pipe, Cfgen(prompt, "", seeds=range(init, init + count)))
gs.gen_sess(add_count=count)


if __name__ == "__main__":
main()
main()
2 changes: 1 addition & 1 deletion examples/sketch_inpaint_xl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@


def main():
model_id = '/home/imgen/models/SDXL/juggernautXL_v8Rundiffusion.safetensors'
model_id = 'frankjoshua/juggernautXL_v8Rundiffusion'
model_id = '/home/imgen/models/SDXL/juggernautXL_v8Rundiffusion.safetensors'
img = PIL.Image.open("./mech_beard_sigm.png")
# read image with mask painted over
img_paint = numpy.array(PIL.Image.open("./mech_beard_sigm_mask.png"))
Expand Down

0 comments on commit cff49f8

Please sign in to comment.