diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Intel MKL FATAL ERROR: Cannot load /home/sh0006yi/miniconda3/envs/pytorch/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so.

Open crystal-kur opened this issue 1 year ago • 4 comments

Describe the bug

d1a3a225abc2e65c071c10277c1920e 128128b305234f349ee0f720a424b67

Reproduction

export MODEL_NAME="runwayml/stable-diffusion-v1-5" export INSTANCE_DIR='/home/sh0006yi/idea/Unlearn_GAI_code/vango_old/van_gogh/pertur0_inn6_dtdugai_sec0.1_per1_lf1_tvae0.0001_vaerecon0.0001_epoch=0_step=3000/cover' #"/home/sh0006yi/idea/Unlearn_GAI_code/vango_old/van_gogh/pertur0_dtdugai_sec0.1_per1_lf1_tclip0.01_vaerecon0.0001_epoch=4_step=44500/stego" #"/home/sh0006yi/idea/Unlearn_GAI_code/vango_old/van_gogh/1pertur0_inn6_dtdugai_sec0.1_per1_lf1_vaerecon0.0001_epoch=2_step=30000/stego" #"/home/sh0006yi/idea/Unlearn_GAI_code/vango_old/van_gogh/pertur0_dtdugai_sec0.1_per1_lf1_tclip0.01_vaerecon0.0001_epoch=3_step=40000/" #/home/sh0006yi/idea/Unlearn_GAI_code/vango_old/van_gogh/pertur0_inn6_dtdugai_sec0.1_per1_lf1_tvae0.0001_vaerecon0.0001_epoch=2_step=30000/ #/home/sh0006yi/idea/Unlearn_GAI_code/vango_old/van_gogh/pertur0_dtdugai_sec0.1_per1_lf1_tvae0.0001_tclip0.01_vaerecon0.0001_epoch=2_step=30000/ export OUTPUT_DIR='/home/sh0006yi/idea/Unlearn_GAI_code/vango_old/van_gogh/pertur0_inn6_dtdugai_sec0.1_per1_lf1_tvae0.0001_vaerecon0.0001_epoch=0_step=3000/train_db_ori' accelerate launch train_dreambooth_lora.py
--pretrained_model_name_or_path=$MODEL_NAME
--instance_data_dir=$INSTANCE_DIR
--output_dir=$OUTPUT_DIR
--instance_prompt="A painting in the style of sks"
--resolution=512
--train_batch_size=5
--gradient_accumulation_steps=1 --gradient_checkpointing
--checkpointing_steps=100
--learning_rate=1e-4
--lr_scheduler="constant"
--lr_warmup_steps=0
--max_train_steps=500
--validation_prompt="A painting in the style of sks"
--validation_epochs=100
--mixed_precision=fp16
--seed="0"

bash train_db.sh

Logs

No response

System Info

(pytorch) sh0006yi@sh0006yi-U3018:~/diffusers-main/examples/dreambooth$ diffusers-cli env Traceback (most recent call last): File "/home/sh0006yi/miniconda3/envs/pytorch/bin/diffusers-cli", line 5, in from diffusers.commands.diffusers_cli import main File "/home/sh0006yi/miniconda3/envs/pytorch/lib/python3.9/site-packages/diffusers/init.py", line 5, in from .utils import ( File "/home/sh0006yi/miniconda3/envs/pytorch/lib/python3.9/site-packages/diffusers/utils/init.py", line 91, in from .peft_utils import ( File "/home/sh0006yi/miniconda3/envs/pytorch/lib/python3.9/site-packages/diffusers/utils/peft_utils.py", line 28, in import torch File "/home/sh0006yi/miniconda3/envs/pytorch/lib/python3.9/site-packages/torch/init.py", line 218, in from torch._C import * # noqa: F403 ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory

Who can help?

@sayakpaul

crystal-kur avatar Apr 11 '24 12:04 crystal-kur

Firstly, could you please be sure that you installed PyTorch properly; or upgrade it to newer versions if it is old and try again?

tolgacangoz avatar Apr 11 '24 12:04 tolgacangoz

Firstly, could you please be sure that you installed PyTorch properly; or upgrade it to newer versions if it is old and try again?

I use the version 2.0.1+11.8 and could run the relevant code previously, while when I upgated to 2.2.2, the error occurs

crystal-kur avatar Apr 12 '24 04:04 crystal-kur

@crystal-kur The traceback seems to indicate an issue with the torch install. Can you try installing torch 2.2. in a fresh virtualenv and run again? Once you have created this fresh environment can you also run diffusers-cli env and share the output

DN6 avatar Apr 13 '24 17:04 DN6

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar May 11 '24 15:05 github-actions[bot]

Closing this issue because of inactivity. Feel free to reopen.

sayakpaul avatar Jun 29 '24 13:06 sayakpaul