Instructions to use kandinsky-community/kandinsky-3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kandinsky-community/kandinsky-3 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-3", 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
Error while Using the Image2Image pipeline
I am trying to implement the Image2Image pipeline of the Kandinsky as:
from diffusers import AutoPipelineForImage2Image
from PIL import Image
import torch
pipe = AutoPipelineForImage2Image.from_pretrained("kandinsky-community/kandinsky-3", variant="fp16", torch_dtype=torch.float16)
pipe.enable_model_cpu_offload()
prompt = "Change the woman in the picture with healthy overweight mature Indian woman"
image = Image.open("/content/Source_Model.jpg").convert("RGB")
generator = torch.Generator(device="cpu").manual_seed(0)
image = pipe(prompt, image = image, strength = 0.75, num_inference_steps = 25, generator = generator).images[0]
image.show()
image.save("/content/Kandinsky_Image.jpg")
In the above process i am getting an error, that says:
partially initialized module 'torch._dynamo' has no attribute 'decorators' (most likely due to a circular import)
I tried to uninstall and then re-install the torch (2.7.1 with cuda 12.6), but the error persists
How to solve this issue?