Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error loading webui in almost all colabs #67

Open
mohalmah opened this issue Aug 11, 2023 · 19 comments
Open

error loading webui in almost all colabs #67

mohalmah opened this issue Aug 11, 2023 · 19 comments

Comments

@mohalmah
Copy link

getting this error, while trying to run the colab as it is without any modification

Launching Web UI with arguments: --share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue
2023-08-11 18:08:02.273722: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-11 18:08:03.208826: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Additional Network extension not installed, Only hijack built-in lora
LoCon Extension hijack built-in lora successfully
*** Error loading script: api.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/api.py", line 8, in <module>
        from modules.api.models import *
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: batch_hijack.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/batch_hijack.py", line 7, in <module>
        from scripts import external_code
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: controlnet.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/controlnet.py", line 13, in <module>
        from scripts import global_state, hook, external_code, processor, batch_hijack, controlnet_version, utils
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
2023-08-11 18:08:13,627 - ControlNet - INFO - ControlNet v1.1.237
*** Error loading script: external_code.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: xyz_grid_support.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/xyz_grid_support.py", line 8, in <module>
        from scripts.external_code import ResizeMode, ControlMode
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
Calculating sha256 for /content/microsoftexcel/models/Stable-diffusion/photon.safetensors: Traceback (most recent call last):
  File "/content/microsoftexcel/launch.py", line 39, in <module>
    main()
  File "/content/microsoftexcel/launch.py", line 35, in main
    start()
  File "/content/microsoftexcel/modules/launch_utils.py", line 394, in start
    webui.webui()
  File "/content/microsoftexcel/webui.py", line 393, in webui
    shared.demo = modules.ui.create_ui()
  File "/content/microsoftexcel/modules/ui.py", line 504, in create_ui
    modules.scripts.scripts_txt2img.setup_ui_for_section(category)
  File "/content/microsoftexcel/modules/scripts.py", line 433, in setup_ui_for_section
    self.create_script_ui(script)
  File "/content/microsoftexcel/modules/scripts.py", line 383, in create_script_ui
    import modules.api.models as api_models
  File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
    ).generate_model()
  File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
    DynamicModel.__config__.allow_population_by_field_name = True
  File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
    raise AttributeError(item)
AttributeError: __config__
ec41bd2a8271acde4ae81cac004d9f3300e7fb0870eae8cbfe0bbc4ef8e27f91
Loading weights [ec41bd2a82] from /content/microsoftexcel/models/Stable-diffusion/photon.safetensors
Creating model from config: /content/microsoftexcel/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Downloading (…)olve/main/vocab.json: 100% 961k/961k [00:00<00:00, 4.63MB/s]
Downloading (…)olve/main/merges.txt: 100% 525k/525k [00:00<00:00, 86.5MB/s]
Downloading (…)cial_tokens_map.json: 100% 389/389 [00:00<00:00, 2.19MB/s]
Downloading (…)okenizer_config.json: 100% 905/905 [00:00<00:00, 4.82MB/s]
Downloading (…)lve/main/config.json: 100% 4.52k/4.52k [00:00<00:00, 17.7MB/s]
Applying attention optimization: xformers... done.
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/charturnerv2.pt: a91b570185766ff71f242f83d5beb6d658348900edb706a2092ba23d6e1e2cf8
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad-picture-chill-75v.pt: 7d9cc5f549d7972f24803a3a9880a923fb9a1b68c1443da3ce1ff2f7eff25ae9
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad_prompt.pt: f9dfe1c982e2a1917054fa827ee1f981c6e6102984f981c691e4f8c817e292cb
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/ulzzang-6500.pt: 66d481a222ee4638e254a411890f2a8716e4ce5c3e1b1957891c7628bbdeac78
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad-artist.pt: 2d356134903e8f47bf6cf519bdf577cdcee42fc717ef264498162e94f130843a
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/pureerosface_v1.pt: dedb4322e42e360fe01775ba817be03ac6a6c307744562bb0d6759368bc681da
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad-image-v2-39000.pt: 5b9281d7c6adc221b8ea9067b678f4b6ff4cc94735e2d50885070380d5496037
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/21charturnerv2.pt: f253abb016c22dd426d6e482f4f8c3960766de6e4c02f151478bfb98f6985383
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/ng_deepnegative_v1_75t.pt: 54e7e4826d53949a3d0dde40aea023b1e456a618c608a7630e3999fd38f93245
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/epiCNegative.pt: 88b8f468357be0d90b993b6b5b4763b603244089b426f40fddcf96b070002f38
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad-hands-5.pt: aa7651be154c46a2f4868788ef84a92b3083b0c0c5c46f5012a56698bfd2a1ba
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/negative_hand-neg.pt: 73b524a2da121eb1b7ad04dea11da286277813120700ff8f1d8522516f7b30ab
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/nfixer.pt: aa5a14f467a8cb8660e92e97ca647ab90ef3aa00dc6da842ab735170347f78c7
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/Asian-Less-Neg.pt: 22d2f003e76f94dcf891b821a3f447f25c73b2e0542f089427b33ff344070a96
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/EasyNegativeV2.safetensors: 339cc9210f70ef842b716588373d95b52351d7e6d111b858e133e3b1e3bd8088
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/UnrealisticDream.pt: a77451e7ea075c7f72d488d2b740b3d3970c671c0ac39dd3155f3c3b129df959
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/rmadanegative402_sd15-neg.pt: ad488e18aa29f12e8fc18d1d2ccc041ff0052d4657c96f1b06cab880f4ba4f40
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad_pictures.pt: 522ac70ba997df4a911e4977e6a9790e7d15236596e8e0c8318330f2af4ab095
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/nartfixer.pt: a0504f05844290ac4d2de41d0338fb642548fb18efd8c6de7bb571ab1d60af89
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/nrealfixer.pt: d1193a5ecddb3b5b052f5efb1a74062dcd130a4060884eed439a605b9731c0ad
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/epiCRealism.pt: 3719288307e4183d01f3aa7737ce952d15fc9e21da13fa0ecea1be4e8c166b10
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/BadDream.pt: 758aac44351557ccfae2fc6bdf3a29670464e4e4eabb61f08c5b8531c221649c
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/FastNegativeEmbedding.pt: 687b669d8234a418005ca9bfda93464b1721285b0a6a8d92490df0f02124ab7c
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/HyperStylizeV6.pt: a09539451c9161038c9ac0a322ad8ffafffb097a70874b65e31eb06f0bb2e412
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/CyberRealistic_Negative-neg.pt: 65f3ea567c04c22f92024c5b55cbeca580bc330c4290aeb647ebd86273b3ffb8
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad_prompt_version2.pt: 6f35e7dd816ae04bb3f774a9a17ebfbc50c0e3a53f69a9a40bed05936d3a3812
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/easynegative.safetensors: c74b4e810b030f6b75fde959e2db678c268d07115b85356d3c0138ba5eb42340
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/ulzzang-6500-v1.1.bin: 8c1af299c7e8c2283892a7ad61a5fe5574e88c9c2ee77cd0cdfc0615155fa315
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/badhandv4.pt: 5e40d722fc3d0c2decb62debfaf8058db30ccdae9ab00ff64b183907b435708e
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/verybadimagenegative_v1.3.pt: d70463f87042e2b5951c303542f3e171cf49af9b7df53b2f20779493786eb143
Calculating sha256 for /content/microsoftexcel/embeddings/embeddings/bad-artist-anime.pt: 5f7bea88750c97a0b8c9ba9f5bc0d13648c3a17a69aaac855903229d5f58c34b
Model loaded in 19.0s (calculate hash: 6.1s, load weights from disk: 0.3s, create model: 3.9s, apply weights to model: 4.4s, apply half(): 2.2s, move model to device: 1.4s, load textual inversion embeddings: 0.2s, calculate empty prompt: 0.4s).

tried to add !pip install tensorrt but that didn't fix it

@SeoYuki5
Copy link

I'm having the same problem. When I run the code:

# Web UI tunnel
!COMMANDLINE_ARGS="--share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue" REQS_FILE="requirements.txt" python launch.py

I get this output:

fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: 1.5.1
Commit hash: <none>




Launching Web UI with arguments: --share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue
2023-08-11 18:13:11.987236: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-11 18:13:12.981865: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
reading lora /content/microsoftexcel/models/Lora/Goddess.safetensors: AssertionError
Traceback (most recent call last):
  File "/content/microsoftexcel/extensions/a1111-microsoftexcel-locon/scripts/../../../extensions-builtin/Lora/network.py", line 35, in __init__
    self.metadata = cache.cached_data_for_file('safetensors-metadata', "lora/" + self.name, filename, read_metadata)
  File "/content/microsoftexcel/modules/cache.py", line 111, in cached_data_for_file
    value = func()
  File "/content/microsoftexcel/extensions/a1111-microsoftexcel-locon/scripts/../../../extensions-builtin/Lora/network.py", line 28, in read_metadata
    metadata = sd_models.read_metadata_from_safetensors(filename)
  File "/content/microsoftexcel/modules/sd_models.py", line 231, in read_metadata_from_safetensors
    assert metadata_len > 2 and json_start in (b'{"', b"{'"), f"{filename} is not a safetensors file"
AssertionError: /content/microsoftexcel/models/Lora/Goddess.safetensors is not a safetensors file

Additional Network extension not installed, Only hijack built-in lora
LoCon Extension hijack built-in lora successfully
*** Error loading script: !adetailer.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/adetailer/scripts/!adetailer.py", line 20, in <module>
        from adetailer import (
      File "/content/microsoftexcel/extensions/adetailer/adetailer/__init__.py", line 2, in <module>
        from .args import AD_ENABLE, ALL_ARGS, ADetailerArgs, EnableChecker
      File "/content/microsoftexcel/extensions/adetailer/adetailer/args.py", line 39, in <module>
        class ADetailerArgs(BaseModel, extra=Extra.forbid):
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 172, in __new__
        set_model_fields(cls, bases, config_wrapper, types_namespace)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 400, in set_model_fields
        fields, class_vars = collect_model_fields(cls, bases, config_wrapper, types_namespace, typevars_map=typevars_map)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_fields.py", line 98, in collect_model_fields
        type_hints = get_cls_type_hints_lenient(cls, types_namespace)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_typing_extra.py", line 212, in get_cls_type_hints_lenient
        hints[name] = eval_type_lenient(value, globalns, localns)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_typing_extra.py", line 224, in eval_type_lenient
        return typing._eval_type(value, globalns, localns)  # type: ignore
      File "/usr/lib/python3.10/typing.py", line 327, in _eval_type
        return t._evaluate(globalns, localns, recursive_guard)
      File "/usr/lib/python3.10/typing.py", line 694, in _evaluate
        eval(self.__forward_code__, globalns, localns),
      File "<string>", line 1, in <module>
    TypeError: constr() got an unexpected keyword argument 'regex'

---
*** Error loading script: api.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/api.py", line 8, in <module>
        from modules.api.models import *
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: batch_hijack.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/batch_hijack.py", line 7, in <module>
        from scripts import external_code
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: controlnet.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/controlnet.py", line 13, in <module>
        from scripts import global_state, hook, external_code, processor, batch_hijack, controlnet_version, utils
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
2023-08-11 18:13:22,883 - ControlNet - INFO - ControlNet v1.1.237
*** Error loading script: external_code.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: xyz_grid_support.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/xyz_grid_support.py", line 8, in <module>
        from scripts.external_code import ResizeMode, ControlMode
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
Loading weights [fe54b5d04d] from /content/microsoftexcel/models/Stable-diffusion/leosamMoonFilm_FilmGrainV2.safetensors
Traceback (most recent call last):
  File "/content/microsoftexcel/launch.py", line 39, in <module>
    main()
  File "/content/microsoftexcel/launch.py", line 35, in main
    start()
  File "/content/microsoftexcel/modules/launch_utils.py", line 394, in start
    webui.webui()
  File "/content/microsoftexcel/webui.py", line 393, in webui
    shared.demo = modules.ui.create_ui()
  File "/content/microsoftexcel/modules/ui.py", line 504, in create_ui
    modules.scripts.scripts_txt2img.setup_ui_for_section(category)
  File "/content/microsoftexcel/modules/scripts.py", line 433, in setup_ui_for_section
    self.create_script_ui(script)
  File "/content/microsoftexcel/modules/scripts.py", line 383, in create_script_ui
    import modules.api.models as api_models
  File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
    ).generate_model()
  File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
    DynamicModel.__config__.allow_population_by_field_name = True
  File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
    raise AttributeError(item)
AttributeError: __config__
Creating model from config: /content/microsoftexcel/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying attention optimization: xformers... done.
Model loaded in 9.5s (load weights from disk: 2.7s, create model: 1.4s, apply weights to model: 2.3s, apply half(): 2.0s, move model to device: 1.0s, calculate empty prompt: 0.1s).

@mohalmah
Copy link
Author

I'm having the same problem. When I run the code:

# Web UI tunnel
!COMMANDLINE_ARGS="--share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue" REQS_FILE="requirements.txt" python launch.py

I get this output:

fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: 1.5.1
Commit hash: <none>




Launching Web UI with arguments: --share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue
2023-08-11 18:13:11.987236: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-11 18:13:12.981865: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
reading lora /content/microsoftexcel/models/Lora/Goddess.safetensors: AssertionError
Traceback (most recent call last):
  File "/content/microsoftexcel/extensions/a1111-microsoftexcel-locon/scripts/../../../extensions-builtin/Lora/network.py", line 35, in __init__
    self.metadata = cache.cached_data_for_file('safetensors-metadata', "lora/" + self.name, filename, read_metadata)
  File "/content/microsoftexcel/modules/cache.py", line 111, in cached_data_for_file
    value = func()
  File "/content/microsoftexcel/extensions/a1111-microsoftexcel-locon/scripts/../../../extensions-builtin/Lora/network.py", line 28, in read_metadata
    metadata = sd_models.read_metadata_from_safetensors(filename)
  File "/content/microsoftexcel/modules/sd_models.py", line 231, in read_metadata_from_safetensors
    assert metadata_len > 2 and json_start in (b'{"', b"{'"), f"{filename} is not a safetensors file"
AssertionError: /content/microsoftexcel/models/Lora/Goddess.safetensors is not a safetensors file

Additional Network extension not installed, Only hijack built-in lora
LoCon Extension hijack built-in lora successfully
*** Error loading script: !adetailer.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/adetailer/scripts/!adetailer.py", line 20, in <module>
        from adetailer import (
      File "/content/microsoftexcel/extensions/adetailer/adetailer/__init__.py", line 2, in <module>
        from .args import AD_ENABLE, ALL_ARGS, ADetailerArgs, EnableChecker
      File "/content/microsoftexcel/extensions/adetailer/adetailer/args.py", line 39, in <module>
        class ADetailerArgs(BaseModel, extra=Extra.forbid):
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 172, in __new__
        set_model_fields(cls, bases, config_wrapper, types_namespace)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 400, in set_model_fields
        fields, class_vars = collect_model_fields(cls, bases, config_wrapper, types_namespace, typevars_map=typevars_map)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_fields.py", line 98, in collect_model_fields
        type_hints = get_cls_type_hints_lenient(cls, types_namespace)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_typing_extra.py", line 212, in get_cls_type_hints_lenient
        hints[name] = eval_type_lenient(value, globalns, localns)
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_typing_extra.py", line 224, in eval_type_lenient
        return typing._eval_type(value, globalns, localns)  # type: ignore
      File "/usr/lib/python3.10/typing.py", line 327, in _eval_type
        return t._evaluate(globalns, localns, recursive_guard)
      File "/usr/lib/python3.10/typing.py", line 694, in _evaluate
        eval(self.__forward_code__, globalns, localns),
      File "<string>", line 1, in <module>
    TypeError: constr() got an unexpected keyword argument 'regex'

---
*** Error loading script: api.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/api.py", line 8, in <module>
        from modules.api.models import *
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: batch_hijack.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/batch_hijack.py", line 7, in <module>
        from scripts import external_code
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: controlnet.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/controlnet.py", line 13, in <module>
        from scripts import global_state, hook, external_code, processor, batch_hijack, controlnet_version, utils
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
2023-08-11 18:13:22,883 - ControlNet - INFO - ControlNet v1.1.237
*** Error loading script: external_code.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
*** Error loading script: xyz_grid_support.py
    Traceback (most recent call last):
      File "/content/microsoftexcel/modules/scripts.py", line 319, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/content/microsoftexcel/modules/script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/xyz_grid_support.py", line 8, in <module>
        from scripts.external_code import ResizeMode, ControlMode
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/content/microsoftexcel/extensions/microsoftexcel-controlnet/internal_controlnet/external_code.py", line 9, in <module>
        from modules.api import api
      File "/content/microsoftexcel/modules/api/api.py", line 19, in <module>
        from modules.api import models
      File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
        ).generate_model()
      File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
        DynamicModel.__config__.allow_population_by_field_name = True
      File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
        raise AttributeError(item)
    AttributeError: __config__

---
Loading weights [fe54b5d04d] from /content/microsoftexcel/models/Stable-diffusion/leosamMoonFilm_FilmGrainV2.safetensors
Traceback (most recent call last):
  File "/content/microsoftexcel/launch.py", line 39, in <module>
    main()
  File "/content/microsoftexcel/launch.py", line 35, in main
    start()
  File "/content/microsoftexcel/modules/launch_utils.py", line 394, in start
    webui.webui()
  File "/content/microsoftexcel/webui.py", line 393, in webui
    shared.demo = modules.ui.create_ui()
  File "/content/microsoftexcel/modules/ui.py", line 504, in create_ui
    modules.scripts.scripts_txt2img.setup_ui_for_section(category)
  File "/content/microsoftexcel/modules/scripts.py", line 433, in setup_ui_for_section
    self.create_script_ui(script)
  File "/content/microsoftexcel/modules/scripts.py", line 383, in create_script_ui
    import modules.api.models as api_models
  File "/content/microsoftexcel/modules/api/models.py", line 112, in <module>
    ).generate_model()
  File "/content/microsoftexcel/modules/api/models.py", line 97, in generate_model
    DynamicModel.__config__.allow_population_by_field_name = True
  File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 205, in __getattr__
    raise AttributeError(item)
AttributeError: __config__
Creating model from config: /content/microsoftexcel/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying attention optimization: xformers... done.
Model loaded in 9.5s (load weights from disk: 2.7s, create model: 1.4s, apply weights to model: 2.3s, apply half(): 2.0s, move model to device: 1.0s, calculate empty prompt: 0.1s).

I think Google blocked running SD on Google Colab, I was running it fine 3 hours ago

@nolanaatama
Copy link
Owner

don't lose hope! we'll be fine!

@DohkoKlaus
Copy link

hello any updates on what happened or what's going on with the files?

@mohalmah
Copy link
Author

don't lose hope! we'll be fine!

ComfyUI is working fine, Maybe you need to change microsoftexcel to googlesheet lol

@ShashwatDubey99
Copy link

same problem here

@ShashwatDubey99
Copy link

anyone have solution ?

@nanashinashi
Copy link

I am also getting the error. Is there any solution?

@DohkoKlaus
Copy link

DohkoKlaus commented Aug 12, 2023

I managed to solve,

first step: run the command pip install pip install pydantic==1.8.2

second step: run the desired model file for example majicmixrealist.ipynb

@SeoYuki5
Copy link

SeoYuki5 commented Aug 12, 2023

I managed to solve,

first step: run the command !pip install pydantic==1.8.2

second step: run the desired model file for example majicmixrealist.ipynb

This indeed works, thank you!

@nanashinashi
Copy link

It worked for me too. Thank you!

@InfinityPlusPlus
Copy link

I managed to solve,
first step: run the command !pip install pydantic==1.8.2
second step: run the desired model file for example majicmixrealist.ipynb

This indeed works, thank you!

IT WORKS!!!! Thank you

@harshascode
Copy link

Thank you.

@shamizen
Copy link

!pip install pydantic==1.10.5
I found success with this command as well.

@demberto
Copy link

I think this colab targets Pydantic v2. So the latest version of v1 (v1.10.12) should be no problem.

@SysGang
Copy link

SysGang commented Aug 14, 2023

I managed to solve,

first step: run the command pip install pip install pydantic==1.8.2

second step: run the desired model file for example majicmixrealist.ipynb

how to implement this?

@tina-hello
Copy link

I managed to solve,
first step: run the command pip install pip install pydantic==1.8.2
second step: run the desired model file for example majicmixrealist.ipynb

how to implement this?

Click the + Code button, paste that command, run it, then run the other cell as usual

@demberto
Copy link

I am noticing similar problems from starlette like Generate button not working or being unresponsive, maybe a lower version for it needs to be used too.

@DohkoKlaus
Copy link

hey guys google colab stopped working? all collabs are not working for me anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests