NUROISEA/anime-webui-colab

NameError: name 'os' is not defined on MixPro Model

DigKingy opened this issue ยท 3 comments

๐Ÿ‘ 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

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:
image

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

Well, I "fixed" this. Let me know if there are any more problems

Alright, thanks a bunch!