stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: dreambooth wrong:def generate_images(self, prompt_data: list[PromptData]) -> [Image]: TypeError: 'type' object is not subscriptable

Open kkiqq22 opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

2023-01-05 01:32:07.132867: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F AVX512_VNNI FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-01-05 01:32:07.291620: I tensorflow/core/util/port.cc:104] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2023-01-05 01:32:08.056794: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/cv2/../../lib64:/usr/local/cuda-11.7/lib64: 2023-01-05 01:32:08.056969: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/cv2/../../lib64:/usr/local/cuda-11.7/lib64: 2023-01-05 01:32:08.056995: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly. No module 'xformers'. Proceeding without it. Error loading script: api.py Traceback (most recent call last): File "/home/uqwenf/stable-diffusion-webui/modules/scripts.py", line 195, in load_scripts module = script_loading.load_module(scriptfile.path) File "/home/uqwenf/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module exec(compiled, module.dict) File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/api.py", line 24, in from extensions.sd_dreambooth_extension.dreambooth.finetune_utils import FilenameTextGetter File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/finetune_utils.py", line 257, in class ImageBuilder: File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/finetune_utils.py", line 330, in ImageBuilder def generate_images(self, prompt_data: list[PromptData]) -> [Image]: TypeError: 'type' object is not subscriptable

Error loading script: dreambooth.py Traceback (most recent call last): File "/home/uqwenf/stable-diffusion-webui/modules/scripts.py", line 195, in load_scripts module = script_loading.load_module(scriptfile.path) File "/home/uqwenf/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module exec(compiled, module.dict) File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/dreambooth.py", line 17, in from extensions.sd_dreambooth_extension.dreambooth.finetune_utils import ImageBuilder, PromptData File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/finetune_utils.py", line 257, in class ImageBuilder: File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/finetune_utils.py", line 330, in ImageBuilder def generate_images(self, prompt_data: list[PromptData]) -> [Image]: TypeError: 'type' object is not subscriptable

Error loading script: main.py Traceback (most recent call last): File "/home/uqwenf/stable-diffusion-webui/modules/scripts.py", line 195, in load_scripts module = script_loading.load_module(scriptfile.path) File "/home/uqwenf/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module exec(compiled, module.dict) File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/main.py", line 9, in from extensions.sd_dreambooth_extension.dreambooth.finetune_utils import generate_prompts File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/finetune_utils.py", line 257, in class ImageBuilder: File "/home/uqwenf/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/finetune_utils.py", line 330, in ImageBuilder def generate_images(self, prompt_data: list[PromptData]) -> [Image]: TypeError: 'type' object is not subscriptable

LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Downloading: 100%|█████████████████████████████████████| 961k/961k [00:00<00:00, 6.00MB/s] Downloading: 100%|█████████████████████████████████████| 525k/525k [00:00<00:00, 3.68MB/s] Downloading: 100%|████████████████████████████████████████| 389/389 [00:00<00:00, 580kB/s] Downloading: 100%|███████████████████████████████████████| 905/905 [00:00<00:00, 1.39MB/s] Downloading: 100%|███████████████████████████████████| 4.52k/4.52k [00:00<00:00, 5.69MB/s] Downloading: 60%|█████████████████████▋ | 1.03G/1.71G [00:09<00:06, 111MB/s]^CTraceback (most recent call last): File "launch.py", line 295, in start() File "launch.py", line 290, in start webui.webui() File "/home/uqwenf/stable-diffusion-webui/webui.py", line 142, in webui initialize() File "/home/uqwenf/stable-diffusion-webui/webui.py", line 66, in initialize modules.sd_models.load_model() File "/home/uqwenf/stable-diffusion-webui/modules/sd_models.py", line 319, in load_model sd_model = instantiate_from_config(sd_config.model) File "/home/uqwenf/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 79, in instantiate_from_config return get_obj_from_str(config["target"])(**config.get("params", dict())) File "/home/uqwenf/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 563, in init self.instantiate_cond_stage(cond_stage_config) File "/home/uqwenf/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 630, in instantiate_cond_stage model = instantiate_from_config(config) File "/home/uqwenf/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 79, in instantiate_from_config return get_obj_from_str(config["target"])(**config.get("params", dict())) File "/home/uqwenf/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/encoders/modules.py", line 100, in init self.transformer = CLIPTextModel.from_pretrained(version) File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2151, in from_pretrained resolved_archive_file = cached_file( File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/transformers/utils/hub.py", line 409, in cached_file resolved_file = hf_hub_download( File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn return fn(*args, **kwargs) File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1242, in hf_hub_download http_get( File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 495, in http_get for chunk in r.iter_content(chunk_size=1024): File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/requests/models.py", line 816, in generate yield from self.raw.stream(chunk_size, decode_content=True) File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/urllib3/response.py", line 628, in stream data = self.read(amt=amt, decode_content=decode_content) File "/home/uqwenf/stable-diffusion-webui/venv/lib/python3.8/site-packages/urllib3/response.py", line 566, in read with self._error_catcher(): File "/usr/lib/python3.8/contextlib.py", line 240, in helper return _GeneratorContextManager(func, args, kwds) File "/usr/lib/python3.8/contextlib.py", line 82, in init def init(self, func, args, kwds): KeyboardInterrupt ownloading: 61%|█████████████████████▉ | 1.04G/1.71G [00:09<00:06, 107MB/s]

Steps to reproduce the problem

1 update the latest webui 2 git clone https://github.com/d8ahazard/sd_dreambooth_extension.git, in stable-diffsion-webui/extiensions/ 3 start up webui

What should have happened?

Normal start

Commit where the problem happens

1

What platforms do you use to access UI ?

Linux

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

./webui.sh --disable-safe-unpickle --server-name=0.0.0.0 --listen --port=6087

Additional information, context and logs

No response

kkiqq22 avatar Jan 05 '23 01:01 kkiqq22