output_type="latent" not working

#7
by Yakonrus - opened
base_inpaint_pipe = AutoPipelineForInpainting.from_pretrained(
    "diffusers/stable-diffusion-xl-1.0-inpainting-0.1",
    torch_dtype=torch.float16,
    variant="fp16",
    use_safetensors=True,
    add_watermarker=False,
)
base_inpaint_pipe.enable_model_cpu_offload(gpu_id=gpu_id)

PIL images at the input
with and without load_image()

    image = base_inpaint_pipe(
        prompt=prompt,
        negative_prompt=nprompt,
        image=load_image(image_s),
        mask_image=load_image(head),
        strength=0.75,
        num_inference_steps=20,
        guidance_scale=12,
        output_type="latent",
        generator=generator,
    ).images
        
    image = base_inpaint_pipe(
        prompt=prompt,
        negative_prompt=nprompt,
        image=image,
        mask_image=load_image(face),
        strength=0.65,
        num_inference_steps=30,
        generator=generator,
    ).images[0]

diffusers\pipelines\stable_diffusion_xl\pipeline_stable_diffusion_xl_inpaint.py", line 1150, in call
num_channels_masked_image = masked_image_latents.shape[1]
AttributeError: 'NoneType' object has no attribute 'shape'

    image = base_inpaint_pipe(
        prompt=prompt,
        negative_prompt=nprompt,
        image=load_image(image_s),
        mask_image=load_image(head),
        strength=0.75,
        num_inference_steps=20,
        guidance_scale=12,
        output_type="latent",
        generator=generator,
    ).images
        
    image = base_inpaint_pipe(
        prompt=prompt,
        negative_prompt=nprompt,
        image=load_image(image),
        mask_image=load_image(face),
        strength=0.65,
        num_inference_steps=30,
        generator=generator,
    ).images[0]

diffusers\utils\testing_utils.py", line 288, in load_image
raise ValueError(
ValueError: Incorrect format used for image. Should be an url linking to an image, a local path, or a PIL image.

Sign up or log in to comment