LeonHLJ / FouriScale

Official implementation of FouriScale (ECCV2024)
Apache License 2.0
128 stars 5 forks source link

Error message under Windows #2

Closed SoftologyPro closed 5 months ago

SoftologyPro commented 5 months ago

Clone the repo. Setup a new virtual environment. Install requirements. Install GPU torch. Run this command (note that Windows needed the sinlge quotes changed to double quotes).

accelerate launch --num_processes 1 text2image_xl.py --pretrained_model_name_or_path stabilityai/stable-diffusion-xl-base-1.0 --validation_prompt "Polenta Fritters with Asparagus & Eggs" --seed 23 --config ./configs/sdxl_2048x2048.yaml --logging_dir ./logs

Gives this error message dialog.

---------------------------
python.exe - Entry Point Not Found
---------------------------
The procedure entry point
?requires_grad@TensorOptions@c10@@QEBA?AU12@V?$optional@_N@2@@Z could not be located in the dynamic link library
D:\Tests\FouriScale\voc_fouriscale\Lib\site-packages\xformers\_C.pyd.
---------------------------
OK   
---------------------------

After clicking OK the rest of the script does appear to run OK and the image is created/saved.

0_Polenta Fritters with Asparagus   Eggs_seed23

SoftologyPro commented 5 months ago

OK, this was due to an xformers version conflict with the newer GPU torch 2.2.1 I am using. If any other Windows users get that error popup, this fixes it

pip uninstall -y xformers
pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts xformers==0.0.25 --index-url https://download.pytorch.org/whl/cu118
pip uninstall -y torch
pip uninstall -y torch
pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts torch==2.2.1+cu118 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
LeonHLJ commented 5 months ago

Thank you for your valuable information. Please feel free to contact us if you have any further questions.