AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.74k stars 26.62k forks source link

[Bug]: ModuleNotFoundError: No module named 'scripts.logging' if directory is moved #14987

Open enn-nafnlaus opened 7 months ago

enn-nafnlaus commented 7 months ago

Checklist

What happened?

ModuleNotFoundError: No module named 'scripts.logging'

This previous issue was closed (https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/14078), but bryanhpchiang was still getting the error despite the supposed "solution" (of running Python=3.10). I ahd the problem too. TL/DR: Lots of extensions (most notably, the ever-critical ControlNet) can't run, failing with repeated errors about importing scripts submodules, in particular, "scripts.logging" (there is no logging.py in the scripts dir, in case that's the issue).

[user@chmmr ~]$ python --version Python 3.10.11

After messing around with various possibilities, I found the trigger: moving the Stable Diffusion directory from stable-diffusion-webui to stable-diffusion-webui-1234. This is common among people who have two GPUs and run two parallel copies of Stable Diffusion.

Steps to reproduce the problem

Fresh install. Installed ControlNet through the UI. Moved the stable-diffusion-webui dir to stable-diffusion-webui-1234.

I suspect that somewhere in the scripting system it's trying to use a hard-coded path.

What should have happened?

Should not throw errors. Should work.

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

{ "Platform": "Linux-6.1.14-100.fc36.x86_64-x86_64-with-glibc2.35", "Python": "3.10.11", "Version": "v1.7.0", "Commit": "cf2772fab0af5573da775e7437e6acdca424f26e", "Script path": "/home/meme/stable-diffusion-webui", "Data path": "/home/meme/stable-diffusion-webui", "Extensions dir": "/home/meme/stable-diffusion-webui/extensions", "Checksum": "26668f108d8a69f6844a22f36b465ec5468bffe3c6139d283e84b5818c905c21", "Commandline": [ "launch.py", "--listen", "--port", "4663", "--no-gradio-queue", "--gradio-auth", "", "--xformers", "--medvram-sdxl", "--enable-insecure-extension-access" ], "Torch env info": { "torch_version": "2.0.1+cu118", "is_debug_build": "False", "cuda_compiled_version": "11.8", "gcc_version": "(Homebrew GCC 11.3.0) 11.3.0", "clang_version": "14.0.5 (Fedora 14.0.5-2.fc36)", "cmake_version": "version 3.28.3", "os": "Fedora Linux 36 (Workstation Edition) (x86_64)", "libc_version": "glibc-2.35", "python_version": "3.10.11 (main, Apr 5 2023, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] (64-bit runtime)", "python_platform": "Linux-6.1.14-100.fc36.x86_64-x86_64-with-glibc2.35", "is_cuda_available": "True", "cuda_runtime_version": "11.7.99", "cuda_module_loading": "LAZY", "nvidia_driver_version": "525.116.04", "nvidia_gpu_models": [ "GPU 0: NVIDIA GeForce RTX 3090", "GPU 1: NVIDIA GeForce RTX 3060" ], "cudnn_version": null, "pip_version": "pip3", "pip_packages": [ "numpy==1.23.5", "open-clip-torch==2.20.0", "pytorch-lightning==1.9.4", "torch==2.0.1+cu118", "torchdiffeq==0.2.3", "torchmetrics==1.3.1", "torchsde==0.2.6", "torchvision==0.15.2+cu118" ], "conda_packages": null, "hip_compiled_version": "N/A", "hip_runtime_version": "N/A", "miopen_runtime_version": "N/A", "caching_allocator_config": "", "is_xnnpack_available": "True", "cpu_info": [ "Architecture: x86_64", "CPU op-mode(s): 32-bit, 64-bit", "Address sizes: 46 bits physical, 48 bits virtual", "Byte Order: Little Endian", "CPU(s): 12", "On-line CPU(s) list: 0-11", "Vendor ID: GenuineIntel", "Model name: Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz", "CPU family: 6", "Model: 85", "Thread(s) per core: 2", "Core(s) per socket: 6", "Socket(s): 1", "Stepping: 4", "CPU(s) scaling MHz: 83%", "CPU max MHz: 4000,0000", "CPU min MHz: 1200,0000", "BogoMIPS: 6999.82", "Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault cat_l3 cdp_l3 invpcid_single pti ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_pkg_req md_clear flush_l1d arch_capabilities", "Virtualization: VT-x", "L1d cache: 192 KiB (6 instances)", "L1i cache: 192 KiB (6 instances)", "L2 cache: 6 MiB (6 instances)", "L3 cache: 8,3 MiB (1 instance)", "NUMA node(s): 1", "NUMA node0 CPU(s): 0-11", "Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled", "Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable", "Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable", "Vulnerability Meltdown: Mitigation; PTI", "Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable", "Vulnerability Retbleed: Mitigation; IBRS", "Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl", "Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization", "Vulnerability Spectre v2: Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS Not affected", "Vulnerability Srbds: Not affected", "Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable" ] }, "Exceptions": [], "CPU": { "model": "x86_64", "count logical": 12, "count physical": 6 }, "RAM": { "total": "125GB", "used": "16GB", "free": "753MB", "active": "62GB", "inactive": "56GB", "buffers": "25GB", "cached": "85GB", "shared": "72MB" }, "Extensions": [ { "name": "prompt-fusion-extension", "path": "/home/meme/stable-diffusion-webui/extensions/prompt-fusion-extension", "version": "1d86996a", "branch": "main", "remote": "https://github.com/ljleb/prompt-fusion-extension.git" }, { "name": "sd-webui-cn-in-extras-tab", "path": "/home/meme/stable-diffusion-webui/extensions/sd-webui-cn-in-extras-tab", "version": "54f3df50", "branch": "master", "remote": "https://github.com/light-and-ray/sd-webui-cn-in-extras-tab.git" }, { "name": "sd-webui-controlnet", "path": "/home/meme/stable-diffusion-webui/extensions/sd-webui-controlnet", "version": "679b6279", "branch": "main", "remote": "https://github.com/Mikubill/sd-webui-controlnet.git" }, { "name": "sd-webui-depth-lib", "path": "/home/meme/stable-diffusion-webui/extensions/sd-webui-depth-lib", "version": "9fecb8df", "branch": "main", "remote": "https://github.com/wywywywy/sd-webui-depth-lib.git" }, { "name": "sd-webui-lama-cleaner-masked-content", "path": "/home/meme/stable-diffusion-webui/extensions/sd-webui-lama-cleaner-masked-content", "version": "aa8e0333", "branch": "master", "remote": "https://github.com/light-and-ray/sd-webui-lama-cleaner-masked-content.git" }, { "name": "seed_travel", "path": "/home/meme/stable-diffusion-webui/extensions/seed_travel", "version": "055213df", "branch": "main", "remote": "https://github.com/yownas/seed_travel.git" }, { "name": "shift-attention", "path": "/home/meme/stable-diffusion-webui/extensions/shift-attention", "version": "0129f6b9", "branch": "main", "remote": "https://github.com/yownas/shift-attention.git" }, { "name": "stable-diffusion-webui-prompt-travel", "path": "/home/meme/stable-diffusion-webui/extensions/stable-diffusion-webui-prompt-travel", "version": "9c532f34", "branch": "main", "remote": "https://github.com/Kahsolt/stable-diffusion-webui-prompt-travel.git" }, { "name": "webui-qrcode-generator", "path": "/home/meme/stable-diffusion-webui/extensions/webui-qrcode-generator", "version": "5d6054f5", "branch": "master", "remote": "https://github.com/missionfloyd/webui-qrcode-generator.git" } ], "Inactive extensions": [], "Environment": { "GIT": "git", "GRADIO_ANALYTICS_ENABLED": "False" }, "Config": { "samples_save": true, "samples_format": "png", "samples_filename_pattern": "", "grid_save": true, "grid_format": "jpg", "grid_extended_filename": true, "grid_only_if_multiple": true, "n_rows": -1, "enable_pnginfo": true, "save_txt": false, "save_images_before_face_restoration": true, "jpeg_quality": 95, "export_for_4chan": true, "use_original_name_batch": true, "save_selected_only": true, "outdir_samples": "", "outdir_txt2img_samples": "outputs/txt2img-images", "outdir_img2img_samples": "outputs/img2img-images", "outdir_extras_samples": "outputs/extras-images", "outdir_grids": "", "outdir_txt2img_grids": "outputs/txt2img-grids", "outdir_img2img_grids": "outputs/img2img-grids", "outdir_save": "log/images", "save_to_dirs": true, "grid_save_to_dirs": true, "directories_filename_pattern": "[date]", "directories_max_prompt_words": 20, "ESRGAN_tile": 192, "ESRGAN_tile_overlap": 8, "realesrgan_enabled_models": [ "Real-ESRGAN 4x plus", "Real-ESRGAN 4x plus anime 6B", "R-ESRGAN General WDN 4xV3", "R-ESRGAN General 4xV3", "R-ESRGAN 2x+", "R-ESRGAN 4x+" ], "SWIN_tile": 192, "SWIN_tile_overlap": 8, "ldsr_steps": 100, "ldsr_pre_down": 1, "ldsr_post_down": 1, "upscaler_for_img2img": "4x-UltraSharp", "face_restoration_model": "GFPGAN", "code_former_weight": 0.5, "face_restoration_unload": true, "memmon_poll_rate": 8, "samples_log_stdout": false, "multiple_tqdm": true, "sd_model_checkpoint": "sd_xl_base_1.0.safetensors [31e35c80fc]", "img2img_color_correction": false, "save_images_before_color_correction": false, "img2img_fix_steps": false, "enable_quantization": true, "enable_emphasis": true, "use_old_emphasis_implementation": false, "enable_batch_seeds": true, "filter_nsfw": false, "random_artist_categories": [ "black-white", "cartoon", "digipa-high-impact", "digipa-med-impact", "fareast", "fineart", "special", "ukioe", "weird" ], "interrogate_keep_models_in_memory": false, "interrogate_use_builtin_artists": true, "interrogate_clip_num_beams": 1, "interrogate_clip_min_length": 24, "interrogate_clip_max_length": 48, "interrogate_clip_dict_limit": 1500.0, "show_progressbar": true, "show_progress_every_n_steps": 10, "return_grid": true, "add_model_hash_to_info": true, "font": "", "js_modal_lightbox": true, "js_modal_lightbox_initialy_zoomed": true, "eta_ddim": 0, "eta_ancestral": 1, "ddim_discretize": "uniform", "s_churn": 0, "s_tmin": 0, "s_noise": 1, "grid_prevent_empty_spots": false, "do_not_add_watermark": false, "use_save_to_dirs_for_ui": true, "use_scale_latent_for_hires_fix": true, "unload_models_when_training": false, "dataset_filename_word_regex": "", "dataset_filename_join_string": " ", "training_image_repeats_per_epoch": 1, "training_write_csv_every": 250.0, "sd_checkpoint_cache": 0, "sd_hypernetwork": "None", "sd_hypernetwork_strength": 1, "comma_padding_backtrack": 20, "CLIP_stop_at_last_layers": 1, "interrogate_return_ranks": false, "interrogate_deepbooru_score_threshold": 0.5, "deepbooru_sort_alpha": true, "deepbooru_use_spaces": false, "deepbooru_escape": true, "do_not_show_images": false, "add_model_name_to_info": false, "js_modal_lightbox_initially_zoomed": true, "show_progress_in_title": true, "quicksettings": "sd_model_checkpoint, sd_lora,sd_hypernetwork,img2img_color_correction,img2img_fix_steps", "hide_samplers": [], "eta_noise_seed_delta": 0, "disable_weights_auto_swap": false, "localization": "None", "show_progress_grid": true, "images_history_preload": false, "images_history_num_per_page": 36.0, "images_history_pages_num": 6.0, "images_history_grid_num": 6.0, "inpainting_mask_weight": 1, "send_seed": true, "training_xattention_optimizations": true, "save_images_before_highres_fix": false, "sd_vae": "Automatic", "save_images_add_number": true, "save_optimizer_state": true, "shuffle_tags": false, "tag_drop_out": 0, "sd_vae_as_default": true, "temp_dir": "", "clean_temp_dir_at_start": false, "pin_memory": false, "disabled_extensions": [], "dd_save_previews": true, "outdir_ddetailer_previews": "extensions/ddetailer/outputs/masks-previews", "dd_save_masks": true, "outdir_ddetailer_masks": "extensions/ddetailer/outputs/masks", "dataset_editor_image_columns": 6.0, "images_history_page_columns": 6.0, "images_history_page_rows": 6.0, "images_history_pages_perload": 20.0, "inspiration_max_samples": 4, "inspiration_rows_num": 4, "inspiration_cols_num": 6, "wildcards_same_seed": false, "ldsr_cached": false, "initial_noise_multiplier": 1, "send_size": true, "depthmap_script_boost_rmax": 1600.0, "images_record_paths": true, "images_delete_message": true, "training_picker_fixed_size": 512.0, "training_picker_videos_path": "/home/meme/stable-diffusion-webui/training-picker/videos", "training_picker_framesets_path": "/home/meme/stable-diffusion-webui/training-picker/extracted-frames", "training_picker_default_output_path": "/home/meme/stable-diffusion-webui/training-picker/cropped-frames", "sd_checkpoint_hash": "31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b", "use_upscaler_name_as_suffix": false, "show_warnings": false, "print_hypernet_extra": false, "save_training_settings_to_txt": true, "training_enable_tensorboard": false, "training_tensorboard_save_images": false, "training_tensorboard_flush_every": 120.0, "sd_vae_checkpoint_cache": 0, "img2img_background_color": "#ffffff", "upcast_attn": false, "use_old_karras_scheduler_sigmas": false, "use_old_hires_fix_width_height": false, "interrogate_clip_skip_categories": [], "deepbooru_filter_tags": "", "extra_networks_default_view": "cards", "extra_networks_default_multiplier": 1, "sd_lora": "", "lora_apply_to_outputs": false, "samplers_in_dropdown": true, "dimensions_and_batch_together": true, "keyedit_precision_attention": 0.1, "keyedit_precision_extra": 0.05, "ui_reorder": "inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts", "ui_extra_networks_tab_reorder": "", "live_previews_enable": true, "show_progress_type": "Full", "live_preview_content": "Prompt", "live_preview_refresh_period": 1000.0, "always_discard_next_to_last_sigma": false, "postprocessing_enable_in_main_ui": [], "postprocessing_operation_order": [], "upscaling_max_images_in_cache": 5, "hakuimg_layer_num": 5.0, "hakuimg_curve_points": 3.0, "animatoranon_film_folder": "C:/AI/frame_interpolation/film.bat", "animatoranon_prop_folder": "c:/ai/props", "animatoranon_output_folder": "", "prompt_fusion_enabled": true, "dp_ignore_whitespace": false, "dp_write_raw_template": true, "dp_write_prompts_to_file": false, "aesthetic_scorer_enabled": true, "aesthetic_scorer_clip_model": "ViT-L/14", "promptgen_names": "AUTOMATIC/promptgen-lexart, AUTOMATIC/promptgen-majinai-safe, AUTOMATIC/promptgen-majinai-unsafe", "promptgen_device": "gpu", "img_downscale_threshold": 4.0, "target_side_length": 4000.0, "no_dpmpp_sde_batch_determinism": false, "control_net_model_config": "/home/meme/stable-diffusion-webui/extensions/sd-webui-controlnet/models/cldm_v15.yaml", "control_net_model_adapter_config": "/home/meme/stable-diffusion-webui/extensions/sd-webui-controlnet/models/sketch_adapter_v14.yaml", "control_net_detectedmap_dir": "/Media/scratch/StableDiffusion/outputs/ControlNet", "control_net_models_path": "", "control_net_max_models_num": 3, "control_net_model_cache_size": 3, "control_net_control_transfer": false, "control_net_no_detectmap": false, "control_net_detectmap_autosaving": true, "control_net_only_midctrl_hires": true, "control_net_allow_script_control": true, "control_net_skip_img2img_processing": false, "control_net_monocular_depth_optim": false, "control_net_only_mid_control": false, "control_net_cfg_based_guidance": false, "depthmap_script_sbsflip": false, "dp_parser_variant_start": "{", "dp_parser_variant_end": "}", "webp_lossless": false, "img_max_size_mp": 200.0, "extra_networks_add_text_separator": " ", "hidden_tabs": [], "uni_pc_variant": "bh1", "uni_pc_skip_type": "time_uniform", "uni_pc_order": 3, "uni_pc_lower_order_final": true, "hide_auto_sd_paint_ext_tab": false, "deforum_keep_3d_models_in_vram": false, "deforum_enable_persistent_settings": false, "deforum_persistent_settings_path": "models/Deforum/deforum_persistent_settings.txt", "dataset_editor_use_temp_files": false, "dataset_editor_use_raw_clip_token": true, "state": [], "state_txt2img": [], "state_img2img": [], "dp_parser_wildcard_wrap": "__", "dp_limit_jinja_prompts": false, "control_net_sync_field_args": false, "control_net_modules_path": "", "control_net_high_res_only_mid": false, "controlnet_show_batch_images_in_ui": false, "controlnet_increment_seed_during_batch": false, "depthmap_script_save_obj": false, "openpose3d_use_online_version": false, "modelscope_deforum_keep_model_in_vram": "None", "modelscope_deforum_vae_settings": "GPU (half precision)", "modelscope_deforum_show_n_videos": -1.0, "state_extensions": [], "save_mask": false, "save_mask_composite": false, "extra_networks_card_width": 0.0, "extra_networks_card_height": 0.0, "return_mask": false, "return_mask_composite": false, "mo_layout": "Cards", "mo_card_width": 0.0, "mo_card_height": 0.0, "mo_storage_type": "SQLite", "mo_download_preview": true, "mo_model_path": "", "mo_vae_path": "", "mo_lora_path": "", "mo_hypernetworks_path": "", "mo_lycoris_path": "", "mo_embeddings_path": "", "controlnet_disable_control_type": false, "controlnet_disable_openpose_edit": false, "dataset_editor_max_res": 0.0, "depthmap_script_keepmodels": false, "depthmap_script_save_ply": false, "depthmap_script_show_3d": true, "depthmap_script_show_3d_inpaint": true, "depthmap_script_mesh_maxsize": 2048.0, "dp_auto_purge_cache": false, "dp_magicprompt_default_model": "Gustavosta/MagicPrompt-Stable-Diffusion", "dp_magicprompt_batch_size": 1, "quicksettings_list": [ "sd_model_checkpoint", "sd_lora", "sd_hypernetwork", "img2img_color_correction", "img2img_fix_steps" ], "ui_reorder_list": [ "inpaint", "sampler", "checkboxes", "hires_fix", "dimensions", "cfg", "seed", "batch", "override_settings", "scripts" ], "grid_zip_filename_pattern": "", "save_init_img": false, "outdir_init_images": "outputs/init-images", "SCUNET_tile": 256, "SCUNET_tile_overlap": 8, "list_hidden_files": true, "sd_unet": "Automatic", "randn_source": "GPU", "cross_attention_optimization": "Automatic", "s_min_uncond": 0, "token_merging_ratio": 0, "token_merging_ratio_img2img": 0, "token_merging_ratio_hr": 0, "pad_cond_uncond": false, "experimental_persistent_cond_cache": false, "dont_fix_second_order_samplers_schedule": false, "hires_fix_use_firstpass_conds": false, "lora_functional": false, "extra_networks_show_hidden_directories": true, "extra_networks_hidden_models": "When searched", "lora_preferred_name": "Alias from file", "lora_add_hashes_to_infotext": true, "gradio_theme": "Default", "img2img_editor_height": 720, "js_modal_lightbox_gamepad": false, "js_modal_lightbox_gamepad_repeat": 250.0, "keyedit_delimiters": ".,\/!?%^*;:{}=`~()", "ui_tab_order": [], "hires_fix_show_sampler": false, "hires_fix_show_prompts": false, "disable_token_counters": false, "extra_options": [], "extra_options_accordion": false, "add_version_to_infotext": true, "infotext_styles": "Apply if any", "live_previews_image_format": "png", "k_sched_type": "Automatic", "sigma_min": 0.0, "sigma_max": 0.0, "rho": 0.0, "canvas_hotkey_zoom": "Alt", "canvas_hotkey_adjust": "Ctrl", "canvas_hotkey_move": "F", "canvas_hotkey_fullscreen": "S", "canvas_hotkey_reset": "R", "canvas_hotkey_overlap": "O", "canvas_show_tooltip": true, "canvas_disabled_functions": [ "Overlap" ], "control_net_inpaint_blur_sigma": 7, "dp_wildcard_manager_no_dedupe": false, "dp_wildcard_manager_no_sort": false, "dp_wildcard_manager_shuffle": false, "grid_text_active_color": "#000000", "grid_text_inactive_color": "#999999", "grid_background_color": "#ffffff", "SWIN_torch_compile": false, "disable_mmap_load_safetensors": false, "auto_vae_precision": true, "sdxl_crop_top": 0.0, "sdxl_crop_left": 0.0, "sdxl_refiner_low_aesthetic_score": 2.5, "sdxl_refiner_high_aesthetic_score": 6.0, "extra_networks_card_text_scale": 1, "extra_networks_card_show_desc": true, "textual_inversion_print_at_load": false, "textual_inversion_add_hashes_to_infotext": true, "lora_show_all": false, "lora_hide_unknown_for_versions": [], "keyedit_move": true, "add_user_name_to_info": false, "canvas_blur_prompt": false, "sd_vae_overrides_per_model_preferences": false, "disable_all_extensions": "none", "hypertile_enable_unet": false, "hypertile_enable_unet_secondpass": false, "hypertile_max_depth_unet": 3, "hypertile_max_tile_unet": 256, "hypertile_swap_size_unet": 3, "hypertile_enable_vae": false, "hypertile_max_depth_vae": 3, "hypertile_max_tile_vae": 128, "hypertile_swap_size_vae": 3, "control_net_unit_count": 3, "controlnet_disable_photopea_edit": false, "controlnet_photopea_warning": true, "controlnet_ignore_noninpaint_mask": false, "controlnet_clip_detector_on_cpu": false, "prompt_fusion_slerp_scale": 0, "prompt_fusion_slerp_negative_origin": true, "prompt_fusion_slerp_epsilon": 0.0001, "upscaling_upscaler_for_lama_cleaner_masked_content": "ESRGAN_4x" }, "Startup": { "total": 11.547645568847656, "records": { "initial startup": 0.019590377807617188, "prepare environment/checks": 8.96453857421875e-05, "prepare environment/git version info": 0.016583919525146484, "prepare environment/torch GPU test": 1.5146706104278564, "prepare environment/clone repositores": 0.062196969985961914, "prepare environment/run extensions installers/webui-qrcode-generator": 0.10640096664428711, "prepare environment/run extensions installers/sd-webui-depth-lib": 7.390975952148438e-05, "prepare environment/run extensions installers/sd-webui-lama-cleaner-masked-content": 2.5987625122070312e-05, "prepare environment/run extensions installers/sd-webui-controlnet": 0.24852514266967773, "prepare environment/run extensions installers/prompt-fusion-extension": 0.00010037422180175781, "prepare environment/run extensions installers/shift-attention": 0.09872055053710938, "prepare environment/run extensions installers/stable-diffusion-webui-prompt-travel": 0.10514140129089355, "prepare environment/run extensions installers/sd-webui-cn-in-extras-tab": 9.799003601074219e-05, "prepare environment/run extensions installers/seed_travel": 0.10584163665771484, "prepare environment/run extensions installers": 0.6649479866027832, "prepare environment": 2.279467821121216, "launcher": 0.0011179447174072266, "import torch": 3.427250862121582, "import gradio": 0.7717952728271484, "setup paths": 1.2757554054260254, "import ldm": 0.002286195755004883, "import sgm": 5.0067901611328125e-06, "initialize shared": 0.1392381191253662, "other imports": 0.663444995880127, "opts onchange": 0.00034809112548828125, "setup SD model": 0.20911049842834473, "setup codeformer": 0.07539176940917969, "setup gfpgan": 0.0069544315338134766, "set samplers": 4.220008850097656e-05, "list extensions": 0.0016341209411621094, "restore config state file": 1.0967254638671875e-05, "list SD models": 0.03311634063720703, "list localizations": 0.00019288063049316406, "load scripts/custom_code.py": 0.0016231536865234375, "load scripts/img2imgalt.py": 0.0002505779266357422, "load scripts/loopback.py": 0.00013589859008789062, "load scripts/outpainting_mk_2.py": 0.00015974044799804688, "load scripts/poor_mans_outpainting.py": 0.00010776519775390625, "load scripts/postprocessing_caption.py": 8.463859558105469e-05, "load scripts/postprocessing_codeformer.py": 8.344650268554688e-05, "load scripts/postprocessing_create_flipped_copies.py": 7.653236389160156e-05, "load scripts/postprocessing_focal_crop.py": 0.0003535747528076172, "load scripts/postprocessing_gfpgan.py": 9.918212890625e-05, "load scripts/postprocessing_split_oversized.py": 9.226799011230469e-05, "load scripts/postprocessing_upscale.py": 0.00016117095947265625, "load scripts/processing_autosized_crop.py": 9.799003601074219e-05, "load scripts/prompt_matrix.py": 0.00011849403381347656, "load scripts/prompts_from_file.py": 0.0002033710479736328, "load scripts/sd_upscale.py": 0.00011658668518066406, "load scripts/xyz_grid.py": 0.0013432502746582031, "load scripts/ldsr_model.py": 0.35247039794921875, "load scripts/lora_script.py": 0.13684654235839844, "load scripts/scunet_model.py": 0.023027658462524414, "load scripts/swinir_model.py": 0.024093151092529297, "load scripts/hotkey_config.py": 0.0001697540283203125, "load scripts/extra_options_section.py": 0.00018262863159179688, "load scripts/hypertile_script.py": 0.044583797454833984, "load scripts/hypertile_xyz.py": 0.0002009868621826172, "load scripts/promptlang.py": 0.12993168830871582, "load scripts/cn_in_extras_tab.py": 0.002144336700439453, "load scripts/adapter.py": 0.0004191398620605469, "load scripts/api.py": 0.17427921295166016, "load scripts/batch_hijack.py": 0.0005679130554199219, "load scripts/cldm.py": 0.00017833709716796875, "load scripts/controlmodel_ipadapter.py": 0.0006949901580810547, "load scripts/controlnet.py": 0.1273787021636963, "load scripts/controlnet_diffusers.py": 0.0002536773681640625, "load scripts/controlnet_lllite.py": 0.00021076202392578125, "load scripts/controlnet_lora.py": 0.00027680397033691406, "load scripts/controlnet_model_guess.py": 0.00032258033752441406, "load scripts/controlnet_version.py": 0.00018787384033203125, "load scripts/enums.py": 0.0005283355712890625, "load scripts/external_code.py": 9.441375732421875e-05, "load scripts/global_state.py": 0.0003418922424316406, "load scripts/hook.py": 0.00040030479431152344, "load scripts/infotext.py": 0.0001468658447265625, "load scripts/logging.py": 0.00024509429931640625, "load scripts/lvminthin.py": 0.0004093647003173828, "load scripts/movie2movie.py": 0.00016307830810546875, "load scripts/processor.py": 0.0007419586181640625, "load scripts/utils.py": 0.00018978118896484375, "load scripts/xyz_grid_support.py": 0.0002434253692626953, "load scripts/main.py": 0.025174379348754883, "load scripts/lama_cleaner_masked_content_sctipt.py": 0.09932565689086914, "load scripts/seed_travel.py": 0.032695770263671875, "load scripts/shift_attention.py": 0.0034754276275634766, "load scripts/controlnet_travel.py": 0.3468444347381592, "load scripts/prompt_travel.py": 0.0012423992156982422, "load scripts/qrcode.py": 0.04040932655334473, "load scripts/refiner.py": 0.00020813941955566406, "load scripts/seed.py": 0.00014448165893554688, "load scripts": 1.5765933990478516, "load upscalers": 0.0013976097106933594, "refresh VAE": 0.0017223358154296875, "refresh textual inversion templates": 3.886222839355469e-05, "scripts list_optimizers": 0.00028324127197265625, "scripts list_unets": 6.198883056640625e-06, "reload hypernetworks": 0.011624336242675781, "initialize extra networks": 0.006212472915649414, "scripts before_ui_callback": 0.0008032321929931641, "create ui": 0.9023971557617188, "gradio launch": 0.14897441864013672, "add APIs": 0.008761882781982422, "app_started_callback/lora_script.py": 0.0002875328063964844, "app_started_callback/api.py": 0.0027718544006347656, "app_started_callback": 0.0030641555786132812 } }, "Packages": [ "absl-py==2.1.0", "accelerate==0.21.0", "addict==2.4.0", "aenum==3.1.15", "aiofiles==23.2.1", "aiohttp==3.9.3", "aiosignal==1.3.1", "altair==5.2.0", "antlr4-python3-runtime==4.9.3", "anyio==3.7.1", "async-timeout==4.0.3", "attrs==23.2.0", "basicsr==1.4.2", "beautifulsoup4==4.12.3", "blendmodes==2022", "certifi==2024.2.2", "cffi==1.16.0", "chardet==5.2.0", "charset-normalizer==3.3.2", "clean-fid==0.1.35", "click==8.1.7", "clip==1.0", "cmake==3.28.3", "coloredlogs==15.0.1", "colorlog==6.8.2", "contourpy==1.2.0", "cssselect2==0.7.0", "cycler==0.12.1", "decorator==4.4.2", "deprecation==2.1.0", "depth-anything==2024.1.22.0", "einops==0.4.1", "embreex==2.17.7.post4", "exceptiongroup==1.2.0", "facexlib==0.3.0", "fastapi==0.94.0", "ffmpy==0.3.2", "filelock==3.13.1", "filterpy==1.4.5", "flatbuffers==23.5.26", "fonttools==4.49.0", "frozenlist==1.4.1", "fsspec==2024.2.0", "ftfy==6.1.3", "future==1.0.0", "fvcore==0.1.5.post20221221", "gdown==5.1.0", "gfpgan==1.3.8", "gitdb==4.0.11", "gitpython==3.1.32", "gradio-client==0.5.0", "gradio==3.41.2", "grpcio==1.60.1", "h11==0.12.0", "handrefinerportable==2024.2.12.0", "httpcore==0.15.0", "httpx==0.24.1", "huggingface-hub==0.20.3", "humanfriendly==10.0", "idna==3.6", "imageio-ffmpeg==0.4.9", "imageio==2.34.0", "importlib-metadata==7.0.1", "importlib-resources==6.1.1", "inflection==0.5.1", "iopath==0.1.9", "jinja2==3.1.3", "jsonmerge==1.8.0", "jsonschema-specifications==2023.12.1", "jsonschema==4.21.1", "kiwisolver==1.4.5", "kornia==0.6.7", "lark==1.1.2", "lazy-loader==0.3", "lightning-utilities==0.10.1", "lit==17.0.6", "llvmlite==0.42.0", "lmdb==1.4.1", "lpips==0.1.4", "lxml==5.1.0", "mapbox-earcut==1.0.1", "markdown==3.5.2", "markupsafe==2.1.5", "matplotlib==3.8.3", "mediapipe==0.10.9", "moviepy==1.0.3", "mpmath==1.3.0", "multidict==6.0.5", "networkx==3.2.1", "numba==0.59.0", "numpy==1.23.5", "omegaconf==2.2.3", "onnxruntime==1.17.0", "open-clip-torch==2.20.0", "opencv-contrib-python==4.9.0.80", "opencv-python==4.9.0.80", "orjson==3.9.14", "packaging==23.2", "pandas==2.2.0", "piexif==1.1.3", "pillow==9.5.0", "pip==21.3.1", "platformdirs==4.2.0", "portalocker==2.8.2", "proglog==0.1.10", "protobuf==3.20.0", "psutil==5.9.5", "pycollada==0.8", "pycparser==2.21", "pydantic==1.10.14", "pydub==0.25.1", "pyparsing==3.1.1", "pysocks==1.7.1", "python-dateutil==2.8.2", "python-multipart==0.0.9", "pytorch-lightning==1.9.4", "pytz==2024.1", "pywavelets==1.5.0", "pyyaml==6.0.1", "realesrgan==0.3.0", "referencing==0.33.0", "regex==2023.12.25", "reportlab==4.1.0", "requests==2.31.0", "resize-right==0.0.2", "rpds-py==0.18.0", "rtree==1.2.0", "safetensors==0.3.1", "scikit-image==0.21.0", "scipy==1.12.0", "segno==1.6.1", "semantic-version==2.10.0", "sentencepiece==0.2.0", "setuptools==59.6.0", "shapely==2.0.3", "six==1.16.0", "smmap==5.0.1", "sniffio==1.3.0", "sounddevice==0.4.6", "soupsieve==2.5", "starlette==0.26.1", "svg.path==6.3", "svglib==1.5.1", "sympy==1.12", "tabulate==0.9.0", "tb-nightly==2.17.0a20240221", "tensorboard-data-server==0.7.2", "termcolor==2.4.0", "tifffile==2024.2.12", "timm==0.9.2", "tinycss2==1.2.1", "tokenizers==0.13.3", "tomesd==0.1.3", "tomli==2.0.1", "toolz==0.12.1", "torch==2.0.1+cu118", "torchdiffeq==0.2.3", "torchmetrics==1.3.1", "torchsde==0.2.6", "torchvision==0.15.2+cu118", "tqdm==4.66.2", "trampoline==0.1.2", "transformers==4.30.2", "trimesh==4.1.4", "triton==2.0.0", "typing-extensions==4.9.0", "tzdata==2024.1", "urllib3==2.2.1", "uvicorn==0.27.1", "vhacdx==0.0.5", "wcwidth==0.2.13", "webencodings==0.5.1", "websockets==11.0.3", "werkzeug==3.0.1", "xatlas==0.0.9", "xformers==0.0.20", "xxhash==3.4.1", "yacs==0.1.8", "yapf==0.40.2", "yarl==1.9.4", "zipp==3.17.0" ] }

Console logs

*** Error loading script: hypertile_script.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions-builtin/hypertile/scripts/hypertile_script.py", line 3, in <module>
        from scripts.hypertile_xyz import add_axis_options
    ModuleNotFoundError: No module named 'scripts.hypertile_xyz'

---
*** Error loading script: api.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/api.py", line 15, in <module>
        from scripts import external_code, global_state
    ImportError: cannot import name 'external_code' from 'scripts' (/home/user/.local/lib/python3.10/site-packages/scripts/__init__.py)

---
*** Error loading script: batch_hijack.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/batch_hijack.py", line 6, in <module>
        from scripts import external_code
    ImportError: cannot import name 'external_code' from 'scripts' (/home/user/.local/lib/python3.10/site-packages/scripts/__init__.py)

---
*** Error loading script: controlmodel_ipadapter.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/controlmodel_ipadapter.py", line 8, in <module>
        from scripts.logging import logger
    ModuleNotFoundError: No module named 'scripts.logging'

---
*** Error loading script: controlnet.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/controlnet.py", line 15, in <module>
        from scripts import global_state, hook, external_code, batch_hijack, controlnet_version, utils
    ImportError: cannot import name 'global_state' from 'scripts' (/home/user/.local/lib/python3.10/site-packages/scripts/__init__.py)

---
*** Error loading script: controlnet_model_guess.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/controlnet_model_guess.py", line 8, in <module>
        from scripts.adapter import PlugableAdapter, Adapter, StyleAdapter, Adapter_light
    ModuleNotFoundError: No module named 'scripts.adapter'

---
*** Error loading script: controlnet_version.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/controlnet_version.py", line 3, in <module>
        from scripts.logging import logger
    ModuleNotFoundError: No module named 'scripts.logging'

---
*** Error loading script: external_code.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/external_code.py", line 1, in <module>
        from internal_controlnet.external_code import *
      File "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/internal_controlnet/external_code.py", line 7, in <module>
        from scripts import global_state
    ImportError: cannot import name 'global_state' from 'scripts' (/home/user/.local/lib/python3.10/site-packages/scripts/__init__.py)

---
*** Error loading script: global_state.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/global_state.py", line 8, in <module>
        from scripts.processor import *
    ModuleNotFoundError: No module named 'scripts.processor'

---
*** Error loading script: hook.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/hook.py", line 8, in <module>
        from scripts.logging import logger
    ModuleNotFoundError: No module named 'scripts.logging'

---
*** Error loading script: infotext.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/infotext.py", line 7, in <module>
        from scripts import external_code
    ImportError: cannot import name 'external_code' from 'scripts' (/home/user/.local/lib/python3.10/site-packages/scripts/__init__.py)

---
*** Error loading script: processor.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/processor.py", line 14, in <module>
        from scripts.logging import logger
    ModuleNotFoundError: No module named 'scripts.logging'

---
*** Error loading script: utils.py
    Traceback (most recent call last):
      File "/home/user/stable-diffusion-webui-1234/modules/scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/user/stable-diffusion-webui-1234/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 "/home/user/stable-diffusion-webui-1234/extensions/sd-webui-1234-controlnet/scripts/utils.py", line 13, in <module>
        from scripts.logging import logger
    ModuleNotFoundError: No module named 'scripts.logging'

---
Loading weights [31e35c80fc] from /home/user/stable-diffusion-webui-1234/models/Stable-diffusion/sd_xl_base_1.0.safetensors
Running on local URL:  http://0.0.0.0:4663

To create a public link, set `share=True` in `launch()`.
Startup time: 12.6s (prepare environment: 2.3s, import torch: 6.9s, import gradio: 0.6s, setup paths: 0.7s, other imports: 0.3s, setup codeformer: 0.1s, load scripts: 1.2s, create ui: 0.3s, gradio launch: 0.2s).
Creating model from config: /home/user/stable-diffusion-webui-1234/repositories/generative-models/configs/inference/sd_xl_base.yaml
Applying attention optimization: xformers... done.
Model loaded in 4.6s (load weights from disk: 1.0s, create model: 0.8s, apply weights to model: 2.0s, calculate empty prompt: 0.7s).

Additional information

None

missionfloyd commented 7 months ago

Delete the venv folder so it creates a new one.

enn-nafnlaus commented 7 months ago

Delete the venv folder so it creates a new one.

This is the solution.

This problem should be detected and at least this solution recommended, if not automatically implemented. Otherwise people are going to keep hitting this problem. It used to work without having to purge venv.

ACBBZ commented 6 months ago

I have same problem, but i can not find the 'venv' folder. I create the environment using miniconda.

ACBBZ commented 6 months ago

I have same problem, but i can not find the 'venv' folder. I create the environment using miniconda.

pip uninstall scripts. sd-webui's scripts.py conflicts with python's scripts package, uninstall it and sd-webui's extension will work.

Arijit0 commented 3 months ago

I have same problem, but i can not find the 'venv' folder. I create the environment using miniconda.

pip uninstall scripts. sd-webui's scripts.py conflicts with python's scripts package, uninstall it and sd-webui's extension will work.

Its gives this message "WARNING: Skipping scripts as it is not installed."

sipie800 commented 2 months ago

+1

youyuanrsq commented 1 month ago

I have same problem, but i can not find the 'venv' folder. I create the environment using miniconda.

pip uninstall scripts. sd-webui's scripts.py conflicts with python's scripts package, uninstall it and sd-webui's extension will work.

Its gives this message "WARNING: Skipping scripts as it is not installed."

If you also installed the environment through conda or miniconda, you can go to your site-packages directory, for example, /path/to/your env/site-packages/, and check if there is a directory called “scripts”. If it exists, delete it.

tachez commented 3 days ago

Delete the venv folder so it creates a new one.

thks! I'm deleted the venv in my stable-diffusion-webui folder, than rerun webui and everything started working fine