Kandinsky-2
Kandinsky-2 copied to clipboard
transformers being locked to 4.23.1 causing issues
In setup.py, is there a reason the transformers dependency is locked to 4.23.1?
I'm hitting an error trying to build a docker worker image of Kandinsky2 with img2img support. There is a CLIPImageProcessor error which is solved by manually updating transformers to 4.29.2.
Traceback (most recent call last):
File "//rp_handler.py", line 8, in <module>
from diffusers import KandinskyImg2ImgPipeline, KandinskyPriorPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/__init__.py", line 59, in <module>
from .pipelines import (
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/__init__.py", line 45, in <module>
from .alt_diffusion import AltDiffusionImg2ImgPipeline, AltDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/alt_diffusion/__init__.py", line 32, in <module>
from .pipeline_alt_diffusion import AltDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py", line 21, in <module>
from transformers import CLIPImageProcessor, XLMRobertaTokenizer
ImportError: cannot import name 'CLIPImageProcessor' from 'transformers' (/usr/local/lib/python3.10/dist-packages/transformers/__init__.py)
Manually updating via pip install git+https://github.com/huggingface/[email protected]
fixes the issue, but gives an error which is concerning. And this does have to be done manually, it can't be done in requirements.txt.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
kandinsky2 0.0.0 requires transformers==4.23.1, but you have transformers 4.29.2 which is incompatible.
Successfully installed transformers-4.29.2
Just wondering if the restriction can be safely removed or if the lock can be changed to 4.29.2?
You might want to check my fork with mem optimization and less strict transformer, works fine on higher version.