NameError: name 'os' is not defined on MixPro Model
DigKingy opened this issue ยท 3 comments
DigKingy commented
๐ Utility script imported.
๐ฉน Applying Colab memory fix...
env: LD_PRELOAD=libtcmalloc.so
๐ผ Selected the latest version of the web UI.
๐ Installing stable-diffusion-webui...
๐ผ Installing the latest versions of the extensions.
๐ฆ Installing 12 extensions...
โ aspect-ratio-preset
โ batchlinks
โ cutoff
โ dynamic-thresholding
โ images-browser
โ latent-couple-two-shot
โ session-organizer
โ state
โ tagcomplete
โ tiled-multidiffusion-upscaler
โ tokenizer
โ tunnels
๐ง Fetching configs...
๐ Fetching embeddings...
๐ฉน Applying web UI Colab patches...
๐ฆ Installing aria2...
โฌ Downloading MIX-Pro-V4.safetensors to /content/stable-diffusion-webui/models/Stable-diffusion...
โฌ Downloading kl-f8-anime2.ckpt to /content/stable-diffusion-webui/models/VAE...
/content/stable-diffusion-webui
Python 3.10.11 (main, Apr 5 2023, 14:15:10) [GCC 9.4.0]
Version: v1.3.0
Commit hash: 20ae71faa8ef035c31aa3a410b707d792c8203a3
Installing gfpgan
Installing clip
Installing open_clip
Cloning Stable Diffusion into /content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...
Cloning Taming Transformers into /content/stable-diffusion-webui/repositories/taming-transformers...
Cloning K-diffusion into /content/stable-diffusion-webui/repositories/k-diffusion...
Cloning CodeFormer into /content/stable-diffusion-webui/repositories/CodeFormer...
Cloning BLIP into /content/stable-diffusion-webui/repositories/BLIP...
Installing requirements for CodeFormer
Installing requirements
Installing pycloudflared
Traceback (most recent call last):
File "/content/stable-diffusion-webui/launch.py", line 40, in <module>
main()
File "/content/stable-diffusion-webui/launch.py", line 30, in main
os.system(f"""sed -i -e "s/dict()))$/dict())).cuda()/gm" /content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py""")
NameError: name 'os' is not defined
NUROISEA commented
Ah, that patch is broken on the latest (and latest-dev most likely) version of the web UI.
For now, you have to use the stable version of the web UI or remove this code in the notebook if you wish to use the latest version:
It seems like the launch.py
has changed and the main code has been moved to modules/launch_utils.py
and that code snippet relies on a specific line, which is now gone lol
I'll find a janky workaround for this, thanks for reporting
NUROISEA commented
Well, I "fixed" this. Let me know if there are any more problems
DigKingy commented
Alright, thanks a bunch!