Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
fix: set true ld_library_path after cuda 11.8 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Linaqruf committed Apr 6, 2023
1 parent aad097d commit ff70137
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fast-kohya-trainer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@
" !pip -q install --upgrade -r requirements.txt\n",
"\n",
" if install_xformers:\n",
" !pip install xformers==0.0.16 triton==2.0.0\n",
" !pip install xformers==0.0.18 triton\n",
"\n",
" from accelerate.utils import write_basic_config\n",
" if not os.path.exists(accelerate_config):\n",
Expand Down
5 changes: 4 additions & 1 deletion kohya-LoRA-dreambooth.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,12 @@
" os.environ[\"LD_PRELOAD\"] = \"libtcmalloc.so\"\n",
" os.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\n",
" os.environ[\"BITSANDBYTES_NOWELCOME\"] = \"1\" \n",
" os.environ[\"LD_LIBRARY_PATH\"] = \"/usr/local/cuda/lib64/:\" + os.environ[\"LD_LIBRARY_PATH\"]\n",
" os.environ[\"SAFETENSORS_FAST_GPU\"] = \"1\"\n",
"\n",
" cuda_path = \"/usr/local/cuda-11.8/targets/x86_64-linux/lib/\"\n",
" ld_library_path = os.environ.get(\"LD_LIBRARY_PATH\", \"\")\n",
" os.environ[\"LD_LIBRARY_PATH\"] = f\"{ld_library_path}:{cuda_path}\"\n",
"\n",
"main()\n"
]
},
Expand Down
5 changes: 4 additions & 1 deletion kohya-LoRA-finetuner.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,12 @@
" os.environ[\"LD_PRELOAD\"] = \"libtcmalloc.so\"\n",
" os.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\n",
" os.environ[\"BITSANDBYTES_NOWELCOME\"] = \"1\" \n",
" os.environ[\"LD_LIBRARY_PATH\"] = \"/usr/local/cuda/lib64/:\" + os.environ[\"LD_LIBRARY_PATH\"]\n",
" os.environ[\"SAFETENSORS_FAST_GPU\"] = \"1\"\n",
"\n",
" cuda_path = \"/usr/local/cuda-11.8/targets/x86_64-linux/lib/\"\n",
" ld_library_path = os.environ.get(\"LD_LIBRARY_PATH\", \"\")\n",
" os.environ[\"LD_LIBRARY_PATH\"] = f\"{ld_library_path}:{cuda_path}\"\n",
"\n",
"main()\n"
]
},
Expand Down
5 changes: 4 additions & 1 deletion kohya-dreambooth.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,12 @@
" os.environ[\"LD_PRELOAD\"] = \"libtcmalloc.so\"\n",
" os.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\n",
" os.environ[\"BITSANDBYTES_NOWELCOME\"] = \"1\" \n",
" os.environ[\"LD_LIBRARY_PATH\"] = \"/usr/local/cuda/lib64/:\" + os.environ[\"LD_LIBRARY_PATH\"]\n",
" os.environ[\"SAFETENSORS_FAST_GPU\"] = \"1\"\n",
"\n",
" cuda_path = \"/usr/local/cuda-11.8/targets/x86_64-linux/lib/\"\n",
" ld_library_path = os.environ.get(\"LD_LIBRARY_PATH\", \"\")\n",
" os.environ[\"LD_LIBRARY_PATH\"] = f\"{ld_library_path}:{cuda_path}\"\n",
"\n",
"main()\n"
]
},
Expand Down
6 changes: 5 additions & 1 deletion kohya-trainer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,13 @@
" os.environ[\"LD_PRELOAD\"] = \"libtcmalloc.so\"\n",
" os.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\n",
" os.environ[\"BITSANDBYTES_NOWELCOME\"] = \"1\" \n",
" os.environ[\"LD_LIBRARY_PATH\"] = \"/usr/local/cuda/lib64/:\" + os.environ[\"LD_LIBRARY_PATH\"]\n",
" os.environ[\"SAFETENSORS_FAST_GPU\"] = \"1\"\n",
"\n",
" cuda_path = \"/usr/local/cuda-11.8/targets/x86_64-linux/lib/\"\n",
" ld_library_path = os.environ.get(\"LD_LIBRARY_PATH\", \"\")\n",
" os.environ[\"LD_LIBRARY_PATH\"] = f\"{ld_library_path}:{cuda_path}\"\n",
"\n",
"\n",
"main()\n"
]
},
Expand Down

0 comments on commit ff70137

Please sign in to comment.