From 67985dd460f99c4ea81475b73e78b1ba9b6ed137 Mon Sep 17 00:00:00 2001 From: lnd212 Date: Sat, 17 Sep 2022 14:44:01 +0400 Subject: [PATCH] Readme. Dependencies getter/remover --- .gitignore | 4 +--- .vscode/settings.json | 3 +++ README.md | 32 +++++++++++++++++++------------- get_dependencies.bat | 9 +++++++++ rem_dependencies.bat | 16 ++++++++++++++++ 5 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 get_dependencies.bat create mode 100644 rem_dependencies.bat diff --git a/.gitignore b/.gitignore index 9965a7c..2f25c81 100644 --- a/.gitignore +++ b/.gitignore @@ -154,6 +154,4 @@ cython_debug/ pretrained/ data/ -ready/ -*.txt -!./promt.txt +ready/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3b66410 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/README.md b/README.md index 47d2969..e2e668f 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,26 @@ # MinDalle_StableDiff -Create pictures with Mindalle and stable diffusion. +Create pictures with Mindalle and stable diffusion. Python script with dependencies installation bat file. -## How to run dalle mini + stable diffusion: - 1. run "get_dependencies.bat" - * if you see connections errors, just run the script again to be shure everything is installed. - 2. run "login.bat" to login to your HuggingFace profile. - a. Go to https://huggingface.co/CompVis/stable-diffusion-v1-4 and make sure to accept the terms. - b. Go to Your Profile > Settings > Access Tokens - c. Create a write token/Copy an existing Token key and enter in the cmd window. - * It can be done once and forever untill you delete token from C:\Users\%YOUR_USERNAME%\.huggingface - 3. You are ready to go. Just run "run_all.bat" to begin. - * First run will be slow due to downloading weights. - * Quantity of output pictures = amount * 60 +## How to set up dalle mini + stable diffusion: +1. Run "get_dependencies.bat" + - if you see connections errors, just run the script again to be shure everything is installed. +2. Run "login.bat" to login to your HuggingFace profile. +a. Go to https://huggingface.co/CompVis/stable-diffusion-v1-4 and make sure to accept the terms. +b. Go to Your Profile > Settings > Access Tokens +c. Create a write token/Copy an existing Token key and enter in the cmd window. + * It can be done once and forever untill you delete token from C:\Users\\%YOUR_USERNAME%\\.huggingface +3. You are redy to go. + +## How to run +1. Write your promt to "promt.txt" +2. Run "run_all.bat" + * First run will be slow due to downloading weights. +3. When amount is asked, enter any number you want. + * Quantity of output pictures = amount * 60 ## Requirements: - Nvidia card with 8GB+ video memory \ No newline at end of file +* 11GB of free space +* Nvidia card with 8GB+ video memory \ No newline at end of file diff --git a/get_dependencies.bat b/get_dependencies.bat new file mode 100644 index 0000000..ad363b2 --- /dev/null +++ b/get_dependencies.bat @@ -0,0 +1,9 @@ +@echo off +.\Python39\python.exe .\Python39\Scripts\pip3.exe cache purge + +.\Python39\python.exe .\Python39\Scripts\pip3.exe install --no-warn-script-location pygments scipy pandas notebook wheel +.\Python39\python.exe .\Python39\Scripts\pip3.exe install --no-warn-script-location piexif +.\Python39\python.exe .\Python39\Scripts\pip3.exe install --no-warn-script-location -qq "ipywidgets>=7,<8" +.\Python39\python.exe .\Python39\Scripts\pip3.exe install --no-warn-script-location torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116 +.\Python39\python.exe .\Python39\Scripts\pip3.exe install --no-warn-script-location -qq -U diffusers==0.3.0 transformers ftfy +.\Python39\python.exe .\Python39\Scripts\pip3.exe install --no-warn-script-location min-dalle diff --git a/rem_dependencies.bat b/rem_dependencies.bat new file mode 100644 index 0000000..872a932 --- /dev/null +++ b/rem_dependencies.bat @@ -0,0 +1,16 @@ +@echo off +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes min-dalle +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes diffusers transformers ftfy +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes ipywidgets +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes torch torchvision torchaudio +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes torch +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes typing_extensions numpy pillow emoji charset-normalizer urllib3 idna certifi wheel scipy pandas notebook pygments +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes requests pure-eval executing asttokens wcwidth parso pycparser webencodings soupsieve cffi attrs colorama colorama pywinpty six +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes backcall backcall prompt-toolkit decorator jedi stack-data pickleshare zipp psutil matplotlib-inline ipython argon2-cffi-bindings +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes jsonschema fastjsonschema tinycss2 importlib-metadata packaging bleach lxml markupsafe jupyterlab-pygments pandocfilters defusedxml +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes mistune beautifulsoup4 pywin32 entrypoints jupyter-client nbformat tornado nbconvert argon2-cffi ipykernel nest-asyncio prometheus-client +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes Send2Trash ipython-genutils jinja2 pyzmq jupyter-core terminado pytz python-dateutil traitlets piexif +.\Python39\python.exe .\Python39\Scripts\pip3.exe uninstall --yes pyparsing pyrsistent debugpy filelock huggingface_hub regex tokenizers tqdm jupyterlab_widgets nbclient widgetsnbextension + +.\Python39\python.exe .\Python39\Scripts\pip3.exe cache purge +.\Python39\python.exe .\Python39\Scripts\cleanpy.exe ./Python39/lib