Open neojam opened 1 month ago
It's certainly less than ideal, but for the last several versions of webui, I've been renaming all of my extensions install.py files to install.bak after their initial install. I started doing this just to speed launch times, but it's ended up also helping with dependency issues too. I've also put a 'protobuf==3.20.2' line into my requirements.txt.
I wrote this script to help automate the renaming process (invoke with python renamer.py extensions install.py install.bak):
import os
import sys
def rename_files(root_dir, pattern, new_name):
for dirpath, dirnames, filenames in os.walk(root_dir):
for filename in filenames:
if pattern in filename and not os.path.exists(filename):
old_path = os.path.join(dirpath, filename)
new_path = os.path.join(dirpath, new_name)
print(f'renaming {old_path} to {new_path}')
os.rename(old_path, new_path)
if __name__ == '__main__':
if len(sys.argv) != 4:
print(f'Usage: {sys.argv[0]} ROOT_DIR=the beginning folder, PATTERN=what to search for, NEW_NAME=new_name')
sys.exit(1)
root_dir = sys.argv[1]
pattern = sys.argv[2]
new_name = sys.argv[3]
rename_files(root_dir, pattern, new_name)
It's certainly less than ideal, but for the last several versions of webui, I've been renaming all of my extensions install.py files to install.bak after their initial install. I started doing this just to speed launch times, but it's ended up also helping with dependency issues too. I've also put a 'protobuf==3.20.2' line into my requirements.txt.
I wrote this script to help automate the renaming process (invoke with python renamer.py extensions install.py install.bak):
import os import sys def rename_files(root_dir, pattern, new_name): for dirpath, dirnames, filenames in os.walk(root_dir): for filename in filenames: if pattern in filename and not os.path.exists(filename): old_path = os.path.join(dirpath, filename) new_path = os.path.join(dirpath, new_name) print(f'renaming {old_path} to {new_path}') os.rename(old_path, new_path) if __name__ == '__main__': if len(sys.argv) != 4: print(f'Usage: {sys.argv[0]} ROOT_DIR=the beginning folder, PATTERN=what to search for, NEW_NAME=new_name') sys.exit(1) root_dir = sys.argv[1] pattern = sys.argv[2] new_name = sys.argv[3] rename_files(root_dir, pattern, new_name)
Yea, I gotta say, as someone that's autistic, and therefore somewhat OCD, this program has been a nightmare. I've gotten it working and gotten some good results, but due to having only 8gbvram, I've been doing all I can to optimize it, which is nearly impossible due to the massive maze of mismatched dependencies/versions..
Makes me miss the days when we could just click to download an install file, double click, and the damn thing would just work..
I COMPLETELY understand. I'm stuck with a 2070 laptop at the moment, as well as mild neuro-superiority! ;-D
Since writing my above comment I have added these (see below) to the bottom of my 'requirements_versions.txt' as they seem to be the biggest troublemakers. And I've upgraded to torch-2.3.1+cu118. Too soon to say whether its a good move or not tho.
tensorflow
tensorboard
mediapipe
onnx
onnxruntime
onnxruntime_gpu
timm==0.6.7
fsspec[http]<=2024.5.0,>=2023.1.0
Checklist
What happened?
If you install any of those extensions (or had those installed prior to last stable WebUI-Update) : adetailer sd-webui-controlnet stable-diffusion-webui-wd14-tagger
WebUI wont be able to start offline, since those extensions will download and install protobuf > 3.20.0 (currently "protobuf 4.25.4").
Uninstalling protobuf 4.25.4 and installing protobuf 3.20.0, will break the extensions mentioned above. (Looks like mediapipe, which is required for all above extentions, causes this compatibility problem)
When those extensions (and so the protobuf 4.25.4 is installed), the WebUI will not run in offline mode. However with internet access, on every run is "Installing requirements" is displayed and webui starts.
When run in offline mode WebUI tries every time to download protobuf==3.20.0, fails and will not start:
currently i had to uninstall all above extentions and do:
After that webui will need to download its reqs again, but the offline mode will work after installing those
Steps to reproduce the problem
What should have happened?
webui should be able to start offline with following extentions: adetailer sd-webui-controlnet stable-diffusion-webui-wd14-tagger
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
Console logs
Additional information
No response