TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.55k stars 1.31k forks source link

Bootstrap issues plus Gradio misbehaving #1892

Open duskfallcrew opened 1 year ago

duskfallcrew commented 1 year ago

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 21, in import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/init.py", line 34, in from pytorch_lightning.callbacks import Callback # noqa: E402 File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/callbacks/init.py", line 14, in from pytorch_lightning.callbacks.callback import Callback File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/callbacks/callback.py", line 25, in from pytorch_lightning.utilities.types import STEP_OUTPUT File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/utilities/init.py", line 18, in from pytorch_lightning.utilities.apply_func import move_data_to_device # noqa: F401 File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/utilities/apply_func.py", line 29, in from pytorch_lightning.utilities.imports import _compare_version, _TORCHTEXT_LEGACY File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/utilities/imports.py", line 22, in import pkg_resources File "/usr/local/lib/python3.9/dist-packages/pkg_resources.py", line 1479, in register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

I'd had an issue where two exetensions blanket screwed up and wouldn't take socket IO so idiot me used pip to install socket IO

<_< then it wont ... literally install ANYTHING or do anyhting.

facepalm I'm preeeettty sure this is my fault for this error, but it was cause it threw a "FROZEN BOOTSTRAP" and "SOCKET IO NOT FOUND" on Civit Ai extensions.

I'm gathering sadly i have to re-reinstall? XD

duskfallcrew commented 1 year ago

OK so i did a roll back and this is the errors i get: Additional Network extension not installed, Only hijack built-in lora LoCon Extension hijack built-in lora successfully [AddNet] Updating model hashes... 0it [00:00, ?it/s] [AddNet] Updating model hashes... 0it [00:00, ?it/s] Civitai: API loaded Error loading script: link.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/scripts/link.py", line 3, in import civitai.link as link File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/civitai/link.py", line 124, in sio = socketio.Client() AttributeError: module 'socketio' has no attribute 'Client'

Error loading script: settings.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/scripts/settings.py", line 1, in from civitai.link import on_civitai_link_key_changed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/civitai/link.py", line 124, in sio = socketio.Client() AttributeError: module 'socketio' has no attribute 'Client'

After this the FIRST time it happened it refused to even connect to NGROK let alone give me a local host URL. upgrading socketIO breaks it entirely, don't even try advanced stuff unless you're the notebook author :P (Aka: leave it to ben!!)

THAT BEING SAID , this time it STILL LOADED BOTH EXTENSIONS, and gave me a LOCAL TUNNEL URL ( Ngrok didn't eve nconnect last time) - Ngrok is still a bit fliffy sometimes, so i go between that andthe local tunnel one ..

it seems to be ok now?

duskfallcrew commented 1 year ago
Screenshot 2023-03-29 at 1 36 54 PM

ugh lies, ok it's UP so the notebook's fine mostly but gradio's being a dork agian.

duskfallcrew commented 1 year ago

Yea and after closing the tab it does this: Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1073, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 962, in preprocess_data processed_input.append(block.preprocess(inputs[i])) IndexError: list index out of range Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1073, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 962, in preprocess_data processed_input.append(block.preprocess(inputs[i])) IndexError: list index out of range

anonderpling commented 1 year ago

I'm getting a similar issue (gradio loading forever), not sure if it's the same or not. I'm getting the following errors in my console:

dynamic prompting: ModuleNotFoundError: No module named 'dynamicprompts.wildcards' ``` Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-dynamic-prompts/scripts/dynamic_prompting.py", line 3, in from sd_dynamic_prompts.dynamic_prompting import Script File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-dynamic-prompts/sd_dynamic_prompts/dynamic_prompting.py", line 14, in from dynamicprompts.wildcards import WildcardManager ModuleNotFoundError: No module named 'dynamicprompts.wildcards' ```
civitai: ModuleNotFoundError: No module named 'socketio' ``` Civitai: API loaded Error loading script: link.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/scripts/link.py", line 3, in import civitai.link as link File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/civitai/link.py", line 4, in import socketio ModuleNotFoundError: No module named 'socketio' Error loading script: settings.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/scripts/settings.py", line 1, in from civitai.link import on_civitai_link_key_changed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_civitai_extension/civitai/link.py", line 4, in import socketio ModuleNotFoundError: No module named 'socketio' ```
anonderpling commented 1 year ago

1862 gave me the answer. Reinstall the affected extensions on each load (delete the directory in gdrive, reload the UI, reinstall the extension. If you have files in the directory, like for dynamic prompting, you might/might not be able to just delete the new dir and restore the old one.

duskfallcrew commented 1 year ago

1862 gave me the answer. Reinstall the affected extensions on each load (delete the directory in gdrive, reload the UI, reinstall the extension. If you have files in the directory, like for dynamic prompting, you might/might not be able to just delete the new dir and restore the old one.

Blah, SO I AHVE TO REHASH 3 hours worth of models again? XD

anonderpling commented 1 year ago

Blah, SO I AHVE TO REHASH 3 hours worth of models again? XD

Shouldn't be necessary for civitai unofficial, just link your models. If they're not in civitai, you might be able to create a dummy .civitai.info file for it? Not sure how it decides to hash things.

duskfallcrew commented 1 year ago

Blah, SO I AHVE TO REHASH 3 hours worth of models again? XD

Shouldn't be necessary for civitai unofficial, just link your models. If they're not in civitai, you might be able to create a dummy .civitai.info file for it? Not sure how it decides to hash things.

Ah, seei 'm running both extensions, i'll just try and clean my model folder up so it doesn't take 20 million years LOL

anonderpling commented 1 year ago

Found a better solution. Add a new cell with the following just above the Start Stable Diffusion cell, and run it before you run that cell:

#@markdown # Reinstall Extensions
print('\033[1;32mReinstalling Extensions...')
%cd /content/gdrive/MyDrive/sd/stable-diffusion-webui
with capture.capture_output() as cap:
  from pathlib import Path
  import launch
  rootdir = Path('/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions')
  file_list = [f for f in rootdir.glob('*/') if not f.is_file()]
  for target_dir in file_list:
    print(target_dir)
    launch.run_extension_installer(target_dir)
%cd /content
clear_output()
inf('\u2714 Done','success', '50px')

This basically iterates over all the extension directories, and re-runs the installer for each. I'm testing this now, and it seems fine - I'm getting errors, but they're not only extension-related; I think they might be from A1111 itself

errors ``` /usr/local/lib/python3.9/dist-packages/tensorflow_io/python/ops/__init__.py:98: UserWarning: unable to load libtensorflow_io_plugins.so: unable to open file: libtensorflow_io_plugins.so, from paths: ['/usr/local/lib/python3.9/dist-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so'] caused by: ['/usr/local/lib/python3.9/dist-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so: undefined symbol: _ZN3tsl6StatusC1EN10tensorflow5error4CodeESt17basic_string_viewIcSt11char_traitsIcEENS_14SourceLocationE'] warnings.warn(f"unable to load libtensorflow_io_plugins.so: {e}") /usr/local/lib/python3.9/dist-packages/tensorflow_io/python/ops/__init__.py:104: UserWarning: file system plugins are not loaded: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.9/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so'] caused by: ['/usr/local/lib/python3.9/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZTVN10tensorflow13GcsFileSystemE'] warnings.warn(f"file system plugins are not loaded: {e}") Error setting up CodeFormer: Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/codeformer_model.py", line 38, in setup_model from facelib.utils.face_restoration_helper import FaceRestoreHelper File "/content/gdrive/MyDrive/sd/stablediffusion/src/codeformer/facelib/utils/face_restoration_helper.py", line 7, in from facelib.detection import init_detection_model File "/content/gdrive/MyDrive/sd/stablediffusion/src/codeformer/facelib/detection/__init__.py", line 8, in from facelib.detection.yolov5face.models.common import Conv ModuleNotFoundError: No module named 'facelib.detection.yolov5face.models.common' Civitai Helper: Get Custom Model Folder Civitai Helper: Load setting from: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/setting.json Civitai Helper: No setting file, use default Additional Network extension not installed, Only hijack built-in lora LoCon Extension hijack built-in lora successfully Error loading script: ldsr_model.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions-builtin/LDSR/scripts/ldsr_model.py", line 10, in import sd_hijack_autoencoder, sd_hijack_ddpm_v1 File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions-builtin/LDSR/sd_hijack_autoencoder.py", line 9, in from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer ModuleNotFoundError: No module named 'taming.modules.vqvae.quantize' Loading weights [0d27c62ffa] from /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/realdosmix_.safetensors Creating model from config: /content/gdrive/MyDrive/sd/stable-diffusion-webui/configs/v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading VAE weights specified in settings: /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/VAE/vae-ft-ema-560000-ema-pruned.ckpt Applying xformers cross attention optimization. ```