Dependencies getter/remover
This commit is contained in:
Морозов Андрей 2022-09-17 14:44:01 +04:00
parent f410a4fba9
commit 67985dd460
5 changed files with 48 additions and 16 deletions

2
.gitignore vendored
View File

@ -155,5 +155,3 @@ cython_debug/
pretrained/
data/
ready/
*.txt
!./promt.txt

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}

View File

@ -4,17 +4,23 @@ 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
* 11GB of free space
* Nvidia card with 8GB+ video memory

9
get_dependencies.bat Normal file
View File

@ -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

16
rem_dependencies.bat Normal file
View File

@ -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