TheLastBen / fast-stable-diffusion

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

No module named 'library' (colab pro) #2216

Open johntable0405 opened 1 year ago

johntable0405 commented 1 year ago

Getting this error when running start stable diffusion cell

Error loading script: presets.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/kohya-sd-scripts-webui/scripts/presets.py", line 6, in from kohya_ss.library import train_util, config_util File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/kohya-sd-scripts-webui/kohya_ss/library/train_util.py", line 61, in from library.lpw_stable_diffusion import StableDiffusionLongPromptWeightingPipeline ModuleNotFoundError: No module named 'library'

ControlNet v1.1.196 ControlNet v1.1.196 Calculating sha256 for /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/model.ckpt: Create LRU cache (max_size=16) for preprocessor results. Create LRU cache (max_size=16) for preprocessor results. Failed to load scripts.tabs.preparation.clean_captions_and_tags No module named 'library' Failed to load scripts.tabs.preparation.make_captions No module named 'library' Failed to load scripts.tabs.preparation.make_captions_by_git No module named 'library' Failed to load scripts.tabs.preparation.merge_captions No module named 'library' Failed to load scripts.tabs.preparation.merge_tags No module named 'library' Failed to load scripts.tabs.preparation.prepare_latents No module named 'library' Failed to load scripts.tabs.preparation.tag_images_by_wd14tagger No module named 'library' Failed to load scripts.tabs.tools.convert_diffusers No module named 'library' Failed to load scripts.tabs.tools.detect_face_rotate No module named 'library' Failed to load scripts.tabs.tools.resize_images_to_resolution No module named 'library' Failed to load scripts.tabs.training.fine_tune No module named 'library' Failed to load scripts.tabs.training.train_db No module named 'library' Failed to load scripts.tabs.training.train_network No module named 'library' Failed to load scripts.tabs.training.train_textual_inversion No module named 'library'

TheLastBen commented 1 year ago

that's an issue with the extension, library is a folder inside the extension's main folder

johntable0405 commented 1 year ago

@TheLastBen Thanks for the quick reply. I also get this error when training textual inversion and the training stops after generating the first preview

File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 612, in train_embedding captioned_image = caption_image_overlay(image, title, footer_left, footer_mid, footer_right) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/textual_inversion/image_embedding.py", line 150, in caption_image_overlay font = ImageFont.truetype(textfont, fontsize) File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFont.py", line 855, in truetype return freetype(font) File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFont.py", line 852, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFont.py", line 215, in init load_from_bytes(font) File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFont.py", line 195, in load_from_bytes self.font_bytes = f.read() AttributeError: 'FreeTypeFont' object has no attribute 'read'

TheLastBen commented 1 year ago

probably the pillow library version, I'll see what I can do