Open neojam opened 3 months 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
Same Issues. In my case, was solved with the first two in the next list. The other changes helpme with some extensions (using pytorch 2.5.0 Cuda12.4/cudnn9.5)
protobuf==4.25.5 open-clip-torch==2.24.0 fastapi==0.115.2
I heve only some warnings about deprecation, but all its working perfectly
Same Issues. In my case, was solved with the first two in the next list. The other changes helpme with some extensions (using pytorch 2.5.0 Cuda12.4/cudnn9.5)
protobuf==4.25.5 open-clip-torch==2.24.0 fastapi==0.115.2
I heve only some warnings about deprecation, but all its working perfectly
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
I've been a ways since writing that post on here. I started out with easydiffussion on windows, swapped to A1111, swapped to Linux(Manjaro), swapped to Fedora Linux, then back to Manjaro, swapped to SD Next, swapped to ComfyUI, bought a new PC, https://youtube.com/shorts/2tNUlMZ2xz8?si=s_vVEByNrLd5KdmQ
Got Garuda Linux going on that.
And now the program is functioning just fine, and my only real struggles are in attempting to refine details on my images. Cuz even with tiling, it's a pain to get people's faces to not look mangled if they're more than 10-20 feet back from the 'camera' (or however you define the spacial relations within the image). I've got a 16gb card now, I hope a 24gb card isn't necessary just to refine details more on the initial output image. Though maybe no one can refine details that much without inpainting.
Oh, and with relevance to this conversation; it's so much easier to get SD webuis working in Linux than Windows. So if you're gonna get serious about using this stuff, I recommend at least dual booting Linux. Although, if you have certain laptops, like anything made by gigabyte, you may get kinda screwed either way. I personally refuse to buy anything made by that company again. Also MSI, but that's a separate thing (they've made something as simple as collecting a key for a bonus game that came with a peice of hardware i bought, into a complete friggin nightmare. So, screw that company).
As for Linux distros, in my experience, Arch distros like Manjaro are solid if you've got good knowledge in PCs and don't mind fixing issues a lot. Cuz it's got rolling(constant) updates, which tend to break things. But it's fully customisable. But also a pain.
Ubuntu is prob the best bet for newbs, but don't expect privacy(from corporations) on a distro that mainstream. Though it'd still be better than chrome distro, in which you may as well just hand all your data to Google and get it over with, lol.
Otherwise, in terms of webuis, get comfyui unless you're a computer moron and can't figure things out on your own. It's superior, well supported, and doesn't even force you to downgrade your python install (or install it twice) just to get the program functioning. Also A1111 and SDN got some built in censorship. So, if you want (mostly) unrestricted image generation, it's the one to go with.
Though in terms of that last note, keep an eye on the versions/updates for it. If it gets an update in which OpenAI helps to overhaul the thing, like they did with SDN, then it may be best to get the version before that.
As a general note, use PCs rather than laptops for this stuff if you can, and try to choose hardware thats got better Linux/open source support. There's not a lot, cuz M$ has a lot of money to keep things that way, but some do. AMD is good for open source.
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