intel-extension-for-transformers
intel-extension-for-transformers copied to clipboard
environment problem in qat for stable diffusion
I followed
pip install intel-extension-for-transformers
pip install -r requirements.txt
pip install transformers==4.34.1
but there exists hugging-face version conflict, and I checked dependabot's advice(#981) upgrade transformers version to 4.36.0. It threw an error like
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "/home/miniconda3/envs/qat/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2863, in from_pretrained
raise ImportError(
ImportError: Using `low_cpu_mem_usage=True` or a `device_map` requires Accelerate: `pip install accelerate`
it seems a problem from transformers, what's the right way to create the environment?
https://github.com/intel/intel-extension-for-transformers/blob/main/examples/huggingface/pytorch/text-to-image/quantization/qat/requirements.txt please install the requirements.txt under the qat example folder, the accelerate is necessary in the requirements.txt, but the error message showed the env missed the package, the transformers version 4.34.1 is validated.