ai-forever / Kandinsky-2

Kandinsky 2 — multilingual text2image latent diffusion model
Apache License 2.0
2.74k stars 305 forks source link

init doesn't include img2img model config #22

Open Alx-AI opened 1 year ago

Alx-AI commented 1 year ago

image

As you can see the init does not accept img2img despite it being supposedly supported.

al00000000al commented 1 year ago

I had the same problem. Need change to: elif task_type == "text2img" or task_type == 'img2img':

mrsobakin commented 1 year ago

There's an easier way to use img2img, which does not require changing the source code. Just load the normal text2img model, and then use .generate_img2img(...) or .mix_images(...). It probably was intended that way, since img2img and text2img use the same model, but for some reason the example in README is wrong.