yangxy / PASD

[ECCV2024] Pixel-Aware Stable Diffusion for Realistic Image Super-Resolution and Personalized Stylization
Apache License 2.0
894 stars 61 forks source link

AssertionError: Please install transformers for generate functionality. `pip install transformers`. #66

Open llstela opened 2 months ago

llstela commented 2 months ago

I use the following commands to prepare the environment.

conda create -n pasd python=3.10 conda activate pasd pip install -r requirements.txt

Because SD-1.5 is not available, so I downloaded SDXL. And then run

python test_pasd_sdxl.py

The terminal outputs:

Traceback (most recent call last): File "/gdata/hot1/shengxuhan/codes/SuperResolution/PASD/test_pasd_sdxl_edited.py", line 316, in main(args) File "/gdata/hot1/shengxuhan/codes/SuperResolution/PASD/test_pasd_sdxl_edited.py", line 226, in main validation_prompt = get_validation_prompt(args, validation_image, model, preprocess, category) File "/gdata/hot1/shengxuhan/codes/SuperResolution/PASD/test_pasd_sdxl_edited.py", line 176, in get_validation_prompt generated = model.generate(image) File "/opt/conda/envs/pasd/lib/python3.10/site-packages/open_clip/coca_model.py", line 224, in generate assert _has_transformers, "Please install transformers for generate functionality. pip install transformers." AssertionError: Please install transformers for generate functionality. pip install transformers.

However, the "transformers" has been installed as in requirements.txt. Therefore, something might be wrong with open_clip_torch and transformers. Please check.

yangxy commented 1 month ago

Update the diffusers and open_clip_torch to the latest version. I will update the requirements.txt soon