dbolya / tomesd

Speed up Stable Diffusion with this one simple trick!
MIT License
1.29k stars 78 forks source link

The installation steps were successful, but the "Token merging" option is missing from the settings for Stable diffusion. #16

Closed zxkke closed 1 year ago

zxkke commented 1 year ago

PS C:\ai\stable-diffusion-webui\venv\Scripts> .\activate (venv) PS C:\ai\stable-diffusion-webui\venv\Scripts> git clone https://github.com/dbolya/tomesd Cloning into 'tomesd'... remote: Enumerating objects: 71, done. remote: Counting objects: 100% (71/71), done. remote: Compressing objects: 100% (48/48), done. Receiving objects: 100% (71/71), 1.25 MiB | 213.00 KiB/s, done. remote: Total 71 (delta 34), reused 48 (delta 18), pack-reused 0 Resolving deltas: 100% (34/34), done. (venv) PS C:\ai\stable-diffusion-webui\venv\Scripts> cd tomesd (venv) PS C:\ai\stable-diffusion-webui\venv\Scripts\tomesd> python setup.py build develop running build running build_py creating build creating build\lib creating build\lib\tomesd copying tomesd\merge.py -> build\lib\tomesd copying tomesd\patch.py -> build\lib\tomesd copying tomesd\utils.py -> build\lib\tomesd copying tomesd__init__.py -> build\lib\tomesd running develop C:\ai\stable-diffusion-webui\venv\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( C:\ai\stable-diffusion-webui\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running egg_info creating tomesd.egg-info writing tomesd.egg-info\PKG-INFO writing dependency_links to tomesd.egg-info\dependency_links.txt writing requirements to tomesd.egg-info\requires.txt writing top-level names to tomesd.egg-info\top_level.txt writing manifest file 'tomesd.egg-info\SOURCES.txt' reading manifest file 'tomesd.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'tomesd.egg-info\SOURCES.txt' running build_ext Creating c:\ai\stable-diffusion-webui\venv\lib\site-packages\tomesd.egg-link (link to .) Adding tomesd 0.1.1 to easy-install.pth file

Installed c:\ai\stable-diffusion-webui\venv\scripts\tomesd Processing dependencies for tomesd==0.1.1 Searching for torch==1.13.1+cu117 Best match: torch 1.13.1+cu117 Adding torch 1.13.1+cu117 to easy-install.pth file Installing convert-caffe2-to-onnx-script.py script to C:\ai\stable-diffusion-webui\venv\Scripts Installing convert-caffe2-to-onnx.exe script to C:\ai\stable-diffusion-webui\venv\Scripts Installing convert-onnx-to-caffe2-script.py script to C:\ai\stable-diffusion-webui\venv\Scripts Installing convert-onnx-to-caffe2.exe script to C:\ai\stable-diffusion-webui\venv\Scripts Installing torchrun-script.py script to C:\ai\stable-diffusion-webui\venv\Scripts Installing torchrun.exe script to C:\ai\stable-diffusion-webui\venv\Scripts

Using c:\ai\stable-diffusion-webui\venv\lib\site-packages Searching for typing-extensions==4.5.0 Best match: typing-extensions 4.5.0 Adding typing-extensions 4.5.0 to easy-install.pth file

Using c:\ai\stable-diffusion-webui\venv\lib\site-packages Finished processing dependencies for tomesd==0.1.1 (venv) PS C:\ai\stable-diffusion-webui\venv\Scripts\tomesd>

GreenLandisaLie commented 1 year ago

There is a commit that will add support for this natively but hasn't been merged yet: https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/9256/files#diff-2284b86f286dc7e0ea4bd09a0ec20c78fbb17d6724d7f0053e78428d0715bbb1 You can try to add this manually or wait for it to be pushed. Then you can use the new args to activate it (see cmd_args.py in the link above). EDIT: You also try this ext: https://git.mmaker.moe/mmaker/sd-webui-tome. Just install tomesd then the ext through link then restart UI > Settings > Token Merging > Enable > Apply and restart

dbolya commented 1 year ago

Hi, this package is not a plugin for the webui. Instead, it adds tools to patch a Stable Diffusion model with ToMe. You still have to apply the patch yourself in whatever installation / repo you use or use a plugin / PR that someone else wrote for your specific environment (like what @GreenLandisaLie mentioned). Closing this issue for now.