1
0
Fork 0

fix(api): positional args for LPW pipeline

This commit is contained in:
Sean Sube 2023-01-14 23:33:44 -06:00
parent f6cb6afd53
commit 47bf4c6bb7
1 changed files with 4 additions and 4 deletions

View File

@ -247,17 +247,17 @@ def run_txt2img_pipeline(model, provider, scheduler, prompt, negative_prompt, cf
print('saved txt2img output: %s' % (output)) print('saved txt2img output: %s' % (output))
def run_img2img_pipeline(model, provider, scheduler, prompt, negative_prompt, cfg, steps, seed, output, strength, input_image): def run_img2img_pipeline(model, provider, scheduler, prompt, negative_prompt, cfg, steps, seed, output, strength, source_image):
pipe = load_pipeline(OnnxStableDiffusionImg2ImgPipeline, pipe = load_pipeline(OnnxStableDiffusionImg2ImgPipeline,
model, provider, scheduler) model, provider, scheduler)
rng = np.random.RandomState(seed) rng = np.random.RandomState(seed)
image = pipe.img2img( image = pipe.img2img(
source_image,
prompt, prompt,
generator=rng, generator=rng,
guidance_scale=cfg, guidance_scale=cfg,
image=input_image,
negative_prompt=negative_prompt, negative_prompt=negative_prompt,
num_inference_steps=steps, num_inference_steps=steps,
strength=strength, strength=strength,
@ -280,13 +280,13 @@ def run_inpaint_pipeline(model, provider, scheduler, prompt, negative_prompt, cf
source_image, mask_image, (left, right, top, bottom)) source_image, mask_image, (left, right, top, bottom))
image = pipe.inpaint( image = pipe.inpaint(
source_image,
mask_image,
prompt, prompt,
generator=rng, generator=rng,
guidance_scale=cfg, guidance_scale=cfg,
height=height, height=height,
image=source_image,
latents=latents, latents=latents,
mask_image=mask_image,
negative_prompt=negative_prompt, negative_prompt=negative_prompt,
num_inference_steps=steps, num_inference_steps=steps,
width=width, width=width,