Stop the program from downloading every time: modify the Launch.py file #10399
Replies: 4 comments 6 replies
-
actually i commented out 2 of your lines then added them back in...the main thing is that you add the below and the import pkg_resources to the beginning of the file. and thhat should fix it. or just download my txt file, change it to .py and put it in your directory. |
Beta Was this translation helpful? Give feedback.
-
Modified run_extensions_installers and added are_requirements_installed, which should also fix the downloading of files. see attached for new file. Again, just change this to .py and replace it in your folder. def run_extensions_installers(settings_file):
def are_requirements_installed(requirements_file):
|
Beta Was this translation helpful? Give feedback.
-
Click "Fork" in the top-right corner of the page, make your changes there, then submit a pull request. |
Beta Was this translation helpful? Give feedback.
-
Python 3.10.13 (main, Aug 24 2023, 22:36:46) [Clang 14.0.3 (clang-1403.0.22.14.1)] 应该如何解答,谢谢 |
Beta Was this translation helpful? Give feedback.
-
launch.txt
change .txt to .py
install in your stable diffusion main folder. Run bat file. and enjoy :) Offline version complete!
Changes:
Added this line as import:
import pkg_resources
#removed the Or because that can cause things to not work.
if not is_installed("torch") and not is_installed("torchvision"):
#made these into seperate calls, so that it doesn't do both if one isn't installed.
#These lines have been commented out to show you that they are not needed. With the below if not and if statements for the requirements file,
#we first check if the requirements have been met, and then if not we download them.
#if not os.path.isfile(requirements_file):
# requirements_file = os.path.join(script_path, requirements_file)
#run_pip(f"install -r "{requirements_file}"", "requirements")
Beta Was this translation helpful? Give feedback.
All reactions