Instructions to use kandinsky-community/kandinsky-2-2-decoder-inpaint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kandinsky-community/kandinsky-2-2-decoder-inpaint with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("kandinsky-community/kandinsky-2-2-decoder-inpaint", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
does the image_embeds in the diffusers inpaint pipeline come from the prior?
#6
by Winne - opened
the inpaint pipeline from in diffusers requires an argument image_embeds, does this embedding come from the prior like the text-to-image pipeline like the following codes
pipe_prior = KandinskyV22PriorPipeline.from_pretrained(prior_path, torch_dtype=torch.float16)
image_emb, zero_image_emb = pipe_prior(prompt, return_dict=False)
out = pipe(
image_emb,
negative_image_embeds=zero_image_emb,
image=image,
mask_image=mask_image,
height=image.height,
width=image.width,
num_inference_steps=150,
)
out_image = out.images[0]