Repository: AUTOMATIC1111/stable-diffusion-webui

Issue:
[Bug]: Lora folders get mixed
### Is there an existing issue for this?

- [x] I have searched the existing issues and checked the recent builds/commits

### What happened?

I have sorted Loras into the folders `NSFW` and `SFW`, but the NSFW folder is mixed into the SFW folder in the UI when I select only the SFW.

### Steps to reproduce the problem

Sort loras into folders where a folder has a substring as its name from another folder. 

### What should have happened?

the folders should not get mixed

### Sysinfo

{
    "Platform": "Windows-10-10.0.19045-SP0",
    "Python": "3.10.10",
    "Version": "v1.6.0-2-g4afaaf8a",
    "Commit": "4afaaf8a020c1df457bcf7250cb1c7f609699fa7",
    "Script path": "Y:\\stable-diffusion-webui",
    "Data path": "Y:\\stable-diffusion-webui",
    "Extensions dir": "Y:\\stable-diffusion-webui\\extensions",
    "Checksum": "6516ab9f4a0cd3e7e03b87fc5aacadbd06a705d2a59483ec32a84f01e2d32b22",
    "Commandline": [
        "launch.py",
        "--ckpt-dir",
        "Y:\\stable_difiusion\\models",
        "--medvram-sdxl",
        "--no-download-sd-model",
        "--xformers",
        "--lora-dir",
        "Y:\\stable_difiusion\\Loaras"
    ],
    "Torch env info": {
        "torch_version": "2.0.1+cu118",
        "is_debug_build": "False",
        "cuda_compiled_version": "11.8",
        "gcc_version": "(MinGW.org GCC Build-2) 9.2.0\r",
        "clang_version": null,
        "cmake_version": null,
        "os": "Microsoft Windows 10 Pro",
        "libc_version": "N/A",
        "python_version": "3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)",
        "python_platform": "Windows-10-10.0.19045-SP0",
        "is_cuda_available": "True",
        "cuda_runtime_version": "11.3.58\r",
        "cuda_module_loading": "LAZY",
        "nvidia_driver_version": "536.23",
        "nvidia_gpu_models": "GPU 0: 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.0.1",
            "torchsde==0.2.5",
            "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=9",
            "CurrentClockSpeed=3792",
            "DeviceID=CPU0",
            "Family=198",
            "L2CacheSize=2048",
            "L2CacheSpeed=",
            "Manufacturer=GenuineIntel",
            "MaxClockSpeed=3792",
            "Name=Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz",
            "ProcessorType=3",
            "Revision="
        ]
    },
    "Exceptions": [],
    "CPU": {
        "model": "Intel64 Family 6 Model 165 Stepping 5, GenuineIntel",
        "count logical": 16,
        "count physical": 8
    },
    "RAM": {
        "total": "32GB",
        "used": "16GB",
        "free": "16GB"
    },
    "Extensions": [
        {
            "name": "--sd-webui-ar-plus",
            "path": "Y:\\stable-diffusion-webui\\extensions\\--sd-webui-ar-plus",
            "version": "a7ac063a",
            "branch": "main",
            "remote": "https://github.com/LEv145/--sd-webui-ar-plus"
        },
        {
            "name": "DWPose",
            "path": "Y:\\stable-diffusion-webui\\extensions\\DWPose",
            "version": "81e6fb58",
            "branch": "onnx",
            "remote": "https://github.com/IDEA-Research/DWPose"
        },
        {
            "name": "LoraTester",
            "path": "Y:\\stable-diffusion-webui\\extensions\\LoraTester",
            "version": "",
            "branch": null,
            "remote": null
        },
        {
            "name": "SD-WebUI-BatchCheckpointPrompt",
            "path": "Y:\\stable-diffusion-webui\\extensions\\SD-WebUI-BatchCheckpointPrompt",
            "version": "6d3c2856",
            "branch": "main",
            "remote": "https://github.com/h43lb1t0/SD-WebUI-BatchCheckpointPrompt"
        },
        {
            "name": "Stable-Diffusion-Webui-Civitai-Helper",
            "path": "Y:\\stable-diffusion-webui\\extensions\\Stable-Diffusion-Webui-Civitai-Helper",
            "version": "ac2f087e",
            "branch": "master",
            "remote": "https://github.com/zixaphir/Stable-Diffusion-Webui-Civitai-Helper.git"
        },
        {
            "name": "StyleSelectorXL",
            "path": "Y:\\stable-diffusion-webui\\extensions\\StyleSelectorXL",
            "version": "5a093f5a",
            "branch": "main",
            "remote": "https://github.com/ahgsql/StyleSelectorXL.git"
        },
        {
            "name": "a-sd-dynamic-prompts",
            "path": "Y:\\stable-diffusion-webui\\extensions\\a-sd-dynamic-prompts",
            "version": "39c06b30",
            "branch": "main",
            "remote": "https://github.com/adieyal/sd-dynamic-prompts.git"
        },
        {
            "name": "adetailer",
            "path": "Y:\\stable-diffusion-webui\\extensions\\adetailer",
            "version": "6b41b3db",
            "branch": "main",
            "remote": "https://github.com/Bing-su/adetailer.git"
        },
        {
            "name": "multidiffusion-upscaler-for-automatic1111",
            "path": "Y:\\stable-diffusion-webui\\extensions\\multidiffusion-upscaler-for-automatic1111",
            "version": "fbb24736",
            "branch": "main",
            "remote": "https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111"
        },
        {
            "name": "sd-webui-controlnet",
            "path": "Y:\\stable-diffusion-webui\\extensions\\sd-webui-controlnet",
            "version": "fce6775a",
            "branch": "main",
            "remote": "https://github.com/Mikubill/sd-webui-controlnet.git"
        },
        {
            "name": "sd-webui-roop",
            "path": "Y:\\stable-diffusion-webui\\extensions\\sd-webui-roop",
            "version": "9a16e728",
            "branch": "main",
            "remote": "https://github.com/s0md3v/sd-webui-roop"
        },
        {
            "name": "stable-diffusion-webui-images-browser",
            "path": "Y:\\stable-diffusion-webui\\extensions\\stable-diffusion-webui-images-browser",
            "version": "08fc2647",
            "branch": "main",
            "remote": "https://github.com/AlUlkesh/stable-diffusion-webui-images-browser.git"
        },
        {
            "name": "stable-diffusion-webui-wd14-tagger",
            "path": "Y:\\stable-diffusion-webui\\extensions\\stable-diffusion-webui-wd14-tagger",
            "version": "e72d984b",
            "branch": "master",
            "remote": "https://github.com/picobyte/stable-diffusion-webui-wd14-tagger.git"
        },
        {
            "name": "ultimate-upscale-for-automatic1111",
            "path": "Y:\\stable-diffusion-webui\\extensions\\ultimate-upscale-for-automatic1111",
            "version": "728ffcec",
            "branch": "master",
            "remote": "https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.git"
        }
    ],
    "Inactive extensions": [
        {
            "name": "CloneCleaner",
            "path": "Y:\\stable-diffusion-webui\\extensions\\CloneCleaner",
            "version": "bf304e4d",
            "branch": "main",
            "remote": "https://github.com/h43lb1t0/CloneCleaner"
        },
        {
            "name": "CloneCleaner - Kopie",
            "path": "Y:\\stable-diffusion-webui\\extensions\\CloneCleaner - Kopie",
            "version": "bf304e4d",
            "branch": "main",
            "remote": "https://github.com/h43lb1t0/CloneCleaner"
        },
        {
            "name": "batch-face-swap",
            "path": "Y:\\stable-diffusion-webui\\extensions\\batch-face-swap",
            "version": "942ebae6",
            "branch": "main",
            "remote": "https://github.com/kex0/batch-face-swap.git"
        },
        {
            "name": "sd-webui-faceswaplab",
            "path": "Y:\\stable-diffusion-webui\\extensions\\sd-webui-faceswaplab",
            "version": "42d1c75b",
            "branch": "main",
            "remote": "https://github.com/glucauze/sd-webui-faceswaplab"
        },
        {
            "name": "sd-webui-sdxl-refiner-hack",
            "path": "Y:\\stable-diffusion-webui\\extensions\\sd-webui-sdxl-refiner-hack",
            "version": "78f4606a",
            "branch": "main",
            "remote": "https://github.com/h43lb1t0/sd-webui-sdxl-refiner-hack.git"
        }
    ],
    "Environment": {
        "COMMANDLINE_ARGS": " --ckpt-dir Y:\\\\stable_difiusion\\\\models --medvram-sdxl --no-download-sd-model --xformers --lora-dir Y:\\\\stable_difiusion\\\\Loaras ",
        "GRADIO_ANALYTICS_ENABLED": "False"
    },
    "Config": {
        "samples_save": true,
        "samples_format": "png",
        "samples_filename_pattern": "",
        "save_images_add_number": true,
        "grid_save": true,
        "grid_format": "png",
        "grid_extended_filename": false,
        "grid_only_if_multiple": true,
        "grid_prevent_empty_spots": false,
        "grid_zip_filename_pattern": "",
        "n_rows": -1,
        "font": "",
        "grid_text_active_color": "#000000",
        "grid_text_inactive_color": "#999999",
        "grid_background_color": "#ffffff",
        "enable_pnginfo": true,
        "save_txt": false,
        "save_images_before_face_restoration": false,
        "save_images_before_highres_fix": true,
        "save_images_before_color_correction": false,
        "save_mask": false,
        "save_mask_composite": false,
        "jpeg_quality": 80,
        "webp_lossless": false,
        "export_for_4chan": false,
        "img_downscale_threshold": 4.0,
        "target_side_length": 4000,
        "img_max_size_mp": 200,
        "use_original_name_batch": true,
        "use_upscaler_name_as_suffix": false,
        "save_selected_only": true,
        "save_init_img": false,
        "temp_dir": "",
        "clean_temp_dir_at_start": false,
        "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",
        "outdir_init_images": "outputs/init-images",
        "save_to_dirs": true,
        "grid_save_to_dirs": true,
        "use_save_to_dirs_for_ui": false,
        "directories_filename_pattern": "[date]",
        "directories_max_prompt_words": 8,
        "ESRGAN_tile": 192,
        "ESRGAN_tile_overlap": 8,
        "realesrgan_enabled_models": [
            "R-ESRGAN 4x+",
            "R-ESRGAN 4x+ Anime6B"
        ],
        "upscaler_for_img2img": null,
        "face_restoration_model": "GFPGAN",
        "code_former_weight": 0.5,
        "face_restoration_unload": true,
        "show_warnings": false,
        "memmon_poll_rate": 40,
        "samples_log_stdout": false,
        "multiple_tqdm": true,
        "print_hypernet_extra": false,
        "list_hidden_files": true,
        "disable_mmap_load_safetensors": false,
        "unload_models_when_training": false,
        "pin_memory": false,
        "save_optimizer_state": false,
        "save_training_settings_to_txt": true,
        "dataset_filename_word_regex": "",
        "dataset_filename_join_string": " ",
        "training_image_repeats_per_epoch": 1,
        "training_write_csv_every": 500,
        "training_xattention_optimizations": false,
        "training_enable_tensorboard": false,
        "training_tensorboard_save_images": false,
        "training_tensorboard_flush_every": 120,
        "sd_model_checkpoint": "sdxl\\realvisxlV20_v20Bakedvae.safetensors [74dda471cc]",
        "sd_checkpoint_cache": 0,
        "sd_vae_checkpoint_cache": 0,
        "sd_vae": "sdxl_vae-fp-16.safetensors",
        "sd_vae_as_default": true,
        "sd_unet": "Automatic",
        "inpainting_mask_weight": 1.0,
        "initial_noise_multiplier": 1.0,
        "img2img_color_correction": false,
        "img2img_fix_steps": true,
        "img2img_background_color": "#ffffff",
        "enable_quantization": false,
        "enable_emphasis": true,
        "enable_batch_seeds": true,
        "comma_padding_backtrack": 20,
        "CLIP_stop_at_last_layers": 1,
        "upcast_attn": false,
        "auto_vae_precision": true,
        "randn_source": "GPU",
        "sdxl_crop_top": 0,
        "sdxl_crop_left": 0,
        "sdxl_refiner_low_aesthetic_score": 2.5,
        "sdxl_refiner_high_aesthetic_score": 6.0,
        "cross_attention_optimization": "sdp - scaled dot product",
        "s_min_uncond": 0.0,
        "token_merging_ratio": 0.0,
        "token_merging_ratio_img2img": 0.0,
        "token_merging_ratio_hr": 0.0,
        "pad_cond_uncond": false,
        "experimental_persistent_cond_cache": false,
        "use_old_emphasis_implementation": false,
        "use_old_karras_scheduler_sigmas": false,
        "no_dpmpp_sde_batch_determinism": false,
        "use_old_hires_fix_width_height": false,
        "dont_fix_second_order_samplers_schedule": false,
        "hires_fix_use_firstpass_conds": false,
        "interrogate_keep_models_in_memory": false,
        "interrogate_return_ranks": false,
        "interrogate_clip_num_beams": 1,
        "interrogate_clip_min_length": 24,
        "interrogate_clip_max_length": 48,
        "interrogate_clip_dict_limit": 1500,
        "interrogate_clip_skip_categories": [],
        "interrogate_deepbooru_score_threshold": 0.5,
        "deepbooru_sort_alpha": true,
        "deepbooru_use_spaces": true,
        "deepbooru_escape": true,
        "deepbooru_filter_tags": "",
        "extra_networks_show_hidden_directories": true,
        "extra_networks_hidden_models": "When searched",
        "extra_networks_default_multiplier": 1.0,
        "extra_networks_card_width": 0,
        "extra_networks_card_height": 0,
        "extra_networks_card_text_scale": 1.0,
        "extra_networks_card_show_desc": true,
        "extra_networks_add_text_separator": " ",
        "ui_extra_networks_tab_reorder": "",
        "textual_inversion_print_at_load": false,
        "textual_inversion_add_hashes_to_infotext": true,
        "sd_hypernetwork": "None",
        "localization": "None",
        "gradio_theme": "Default",
        "img2img_editor_height": 720,
        "return_grid": true,
        "return_mask": false,
        "return_mask_composite": false,
        "do_not_show_images": false,
        "send_seed": true,
        "send_size": true,
        "js_modal_lightbox": true,
        "js_modal_lightbox_initially_zoomed": true,
        "js_modal_lightbox_gamepad": false,
        "js_modal_lightbox_gamepad_repeat": 250,
        "show_progress_in_title": true,
        "samplers_in_dropdown": true,
        "dimensions_and_batch_together": true,
        "keyedit_precision_attention": 0.1,
        "keyedit_precision_extra": 0.05,
        "keyedit_delimiters": ".,\\/!?%^*;:{}=`~()",
        "keyedit_move": true,
        "quicksettings_list": [
            "sd_model_checkpoint",
            "sd_vae",
            "CLIP_stop_at_last_layers",
            "sd_unet"
        ],
        "ui_tab_order": [],
        "hidden_tabs": [],
        "ui_reorder_list": [],
        "hires_fix_show_sampler": false,
        "hires_fix_show_prompts": true,
        "disable_token_counters": false,
        "add_model_hash_to_info": true,
        "add_model_name_to_info": true,
        "add_user_name_to_info": false,
        "add_version_to_infotext": true,
        "disable_weights_auto_swap": true,
        "infotext_styles": "Apply if any",
        "show_progressbar": true,
        "live_previews_enable": true,
        "live_previews_image_format": "webp",
        "show_progress_grid": true,
        "show_progress_every_n_steps": 10,
        "show_progress_type": "Full",
        "live_preview_content": "Prompt",
        "live_preview_refresh_period": 1000,
        "hide_samplers": [],
        "eta_ddim": 0.0,
        "eta_ancestral": 1.0,
        "ddim_discretize": "uniform",
        "s_churn": 0.0,
        "s_tmin": 0.0,
        "s_noise": 1.0,
        "k_sched_type": "Automatic",
        "sigma_min": 0.0,
        "sigma_max": 0.0,
        "rho": 0.0,
        "eta_noise_seed_delta": 0,
        "always_discard_next_to_last_sigma": false,
        "uni_pc_variant": "bh1",
        "uni_pc_skip_type": "time_uniform",
        "uni_pc_order": 3,
        "uni_pc_lower_order_final": true,
        "postprocessing_enable_in_main_ui": [],
        "postprocessing_operation_order": [],
        "upscaling_max_images_in_cache": 5,
        "disabled_extensions": [
            "CloneCleaner",
            "CloneCleaner - Kopie",
            "batch-face-swap",
            "sd-webui-faceswaplab",
            "sd-webui-sdxl-refiner-hack"
        ],
        "disable_all_extensions": "none",
        "restore_config_state_file": "",
        "sd_checkpoint_hash": "74dda471cc0a288d4b672bda0316dd2ce8d46878363b0203f1591c12e0c03e01",
        "ldsr_steps": 100,
        "ldsr_cached": false,
        "SCUNET_tile": 256,
        "SCUNET_tile_overlap": 8,
        "SWIN_tile": 192,
        "SWIN_tile_overlap": 8,
        "lora_functional": false,
        "sd_lora": "None",
        "lora_preferred_name": "Alias from file",
        "lora_add_hashes_to_infotext": true,
        "lora_show_all": false,
        "lora_hide_unknown_for_versions": [],
        "extra_options": [],
        "extra_options_accordion": false,
        "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_blur_prompt": false,
        "canvas_disabled_functions": [
            "Overlap"
        ],
        "sdxl_base_model": "sdxl\\sd_xl_base_1.0.safetensors",
        "sdxl_refiner_model": "sdxl\\sd_xl_refiner_1.0.safetensors",
        "sd_vae_overrides_per_model_preferences": false,
        "save_incomplete_images": false,
        "face_restoration": false,
        "auto_launch_browser": "Local",
        "show_gradio_deprecation_warnings": true,
        "hide_ldm_prints": true,
        "api_enable_requests": true,
        "api_forbid_local_requests": true,
        "api_useragent": "",
        "sd_checkpoints_limit": 1,
        "sd_checkpoints_keep_in_cpu": true,
        "tiling": false,
        "hires_fix_refiner_pass": "second pass",
        "sd_vae_encode_method": "Full",
        "sd_vae_decode_method": "Full",
        "img2img_extra_noise": 0,
        "img2img_sketch_default_brush_color": "#ffffff",
        "img2img_inpaint_mask_brush_color": "#ffffff",
        "img2img_inpaint_sketch_default_brush_color": "#ffffff",
        "persistent_cond_cache": true,
        "batch_cond_uncond": true,
        "use_old_scheduling": false,
        "lora_in_memory_limit": 0,
        "gradio_themes_cache": true,
        "gallery_height": "",
        "extra_options_txt2img": [],
        "extra_options_img2img": [],
        "extra_options_cols": 1,
        "live_preview_allow_lowvram_full": false,
        "live_preview_fast_interrupt": false,
        "s_tmax": 0,
        "sgm_noise_multiplier": false,
        "canvas_auto_expand": true,
        "promptRegex": "{prompt}",
        "batchCountRegex": "\\{\\{count:[0-9]+\\}\\}",
        "clipSkipRegex": "\\{\\{clip_skip:[0-9]+\\}\\}",
        "negPromptRegex": "\\{\\{neg:(.*?)\\}\\}",
        "ch_open_url_with_js": true,
        "ch_always_display": true,
        "ch_show_btn_on_thumb": true,
        "ch_max_size_preview": true,
        "ch_skip_nsfw_preview": false,
        "ch_dl_webui_metadata": true,
        "ch_proxy": "",
        "styles_ui": "select-list",
        "enable_styleselector_by_default": true,
        "prompt_database_path": "prompt_tree.yml",
        "enable_clonecleaner_by_default": true,
        "ad_max_models": 2,
        "ad_save_previews": false,
        "ad_save_images_before": false,
        "ad_only_seleted_scripts": true,
        "ad_script_names": "dynamic_prompting,dynamic_thresholding,wildcard_recursive,wildcards,lora_block_weight",
        "ad_bbox_sortby": "None",
        "control_net_detectedmap_dir": "detected_maps",
        "control_net_models_path": "Y:\\stable_difiusion\\controll-net-models",
        "control_net_modules_path": "",
        "control_net_unit_count": 3,
        "control_net_model_cache_size": 1,
        "control_net_inpaint_blur_sigma": 7,
        "control_net_no_high_res_fix": true,
        "control_net_no_detectmap": false,
        "control_net_detectmap_autosaving": false,
        "control_net_allow_script_control": true,
        "control_net_sync_field_args": true,
        "controlnet_show_batch_images_in_ui": false,
        "controlnet_increment_seed_during_batch": false,
        "controlnet_disable_control_type": false,
        "controlnet_disable_openpose_edit": false,
        "controlnet_ignore_noninpaint_mask": true,
        "image_browser_active_tabs": "txt2img, img2img, txt2img-grids, img2img-grids, Extras, Favorites, Others, All, Maintenance",
        "image_browser_hidden_components": [],
        "image_browser_with_subdirs": true,
        "image_browser_preload": false,
        "image_browser_copy_image": false,
        "image_browser_delete_message": true,
        "image_browser_txt_files": true,
        "image_browser_debug_level": "0 - none",
        "image_browser_delete_recycle": true,
        "image_browser_scan_exif": true,
        "image_browser_mod_shift": false,
        "image_browser_mod_ctrl_shift": false,
        "image_browser_ranking_pnginfo": false,
        "image_browser_page_columns": 6.0,
        "image_browser_page_rows": 6.0,
        "image_browser_pages_perload": 20.0,
        "image_browser_height_auto": false,
        "image_browser_use_thumbnail": false,
        "image_browser_thumbnail_size": 200.0,
        "image_browser_swipe": false,
        "image_browser_img_tooltips": true,
        "image_browser_show_progress": true,
        "image_browser_info_add": false,
        "tagger_out_filename_fmt": "[name].[output_extension]",
        "tagger_count_threshold": 100,
        "tagger_batch_recursive": true,
        "tagger_auto_serde_json": true,
        "tagger_store_images": false,
        "tagger_weighted_tags_files": false,
        "tagger_verbose": false,
        "tagger_repl_us": true,
        "tagger_repl_us_excl": "0_0, (o)_(o), +_+, +_-, ._., <o>_<o>, <|>_<|>, =_=, >_<, 3_3, 6_9, >_o, @_@, ^_^, o_o, u_u, x_x, |_|, ||_||",
        "tagger_escape": false,
        "tagger_batch_size": 1024.0,
        "tagger_hf_cache_dir": "Y:\\stable-diffusion-webui\\models\\interrogators",
        "dp_ignore_whitespace": false,
        "dp_write_raw_template": true,
        "dp_write_prompts_to_file": false,
        "dp_parser_variant_start": "{",
        "dp_parser_variant_end": "}",
        "dp_parser_wildcard_wrap": "__",
        "dp_limit_jinja_prompts": false,
        "dp_auto_purge_cache": false,
        "dp_wildcard_manager_no_dedupe": false,
        "dp_wildcard_manager_no_sort": false,
        "dp_wildcard_manager_shuffle": false,
        "dp_magicprompt_default_model": "Gustavosta/MagicPrompt-Stable-Diffusion",
        "dp_magicprompt_batch_size": 1,
        "civitai_link_key": "600cbeee8abb2a152e3fa4166c3c12b118476f326bded6bf8eaa04016882340bc6a575ae9927ad946db547a992481bf93c010c7bd981916e5c55d4d5b5f8673d",
        "civitai_link_logging": true,
        "civitai_api_key": "",
        "civitai_download_previews": true,
        "civitai_download_triggers": true,
        "civitai_nsfw_previews": true,
        "civitai_download_missing_models": false,
        "civitai_hashify_resources": false,
        "civitai_folder_model": "",
        "civitai_folder_lora": "",
        "civitai_folder_lyco": "",
        "styleRegex": "\\{\\{style:(.*?)\\}\\}",
        "ch_hide_buttons": [
            "add_trigger_words_button"
        ],
        "ch_nsfw_preview_threshold": "Allow All",
        "ch_use_sdwebui_sha256": false
    },
    "Startup": {
        "total": 33.19213247299194,
        "records": {
            "initial startup": 0.0,
            "prepare environment/checks": 0.0,
            "prepare environment/git version info": 0.04684615135192871,
            "prepare environment/torch GPU test": 1.6322832107543945,
            "prepare environment/clone repositores": 0.13394856452941895,
            "prepare environment/run extensions installers/--sd-webui-ar-plus": 0.0,
            "prepare environment/run extensions installers/a-sd-dynamic-prompts": 0.15370750427246094,
            "prepare environment/run extensions installers/adetailer": 0.11597299575805664,
            "prepare environment/run extensions installers/DWPose": 0.0,
            "prepare environment/run extensions installers/LoraTester": 0.0,
            "prepare environment/run extensions installers/multidiffusion-upscaler-for-automatic1111": 0.0,
            "prepare environment/run extensions installers/SD-WebUI-BatchCheckpointPrompt": 0.0,
            "prepare environment/run extensions installers/sd-webui-controlnet": 3.7403218746185303,
            "prepare environment/run extensions installers/sd-webui-roop": 9.727271556854248,
            "prepare environment/run extensions installers/Stable-Diffusion-Webui-Civitai-Helper": 0.0,
            "prepare environment/run extensions installers/stable-diffusion-webui-images-browser": 0.09660506248474121,
            "prepare environment/run extensions installers/stable-diffusion-webui-wd14-tagger": 2.630730152130127,
            "prepare environment/run extensions installers/StyleSelectorXL": 0.0,
            "prepare environment/run extensions installers/ultimate-upscale-for-automatic1111": 0.0,
            "prepare environment/run extensions installers": 16.464609146118164,
            "prepare environment": 18.324591159820557,
            "launcher": 0.0,
            "import torch": 5.275165557861328,
            "import gradio": 0.6702303886413574,
            "setup paths": 0.6705753803253174,
            "import ldm": 0.0,
            "import sgm": 0.0,
            "initialize shared": 0.20056796073913574,
            "other imports": 0.5286440849304199,
            "opts onchange": 0.0,
            "setup SD model": 0.0,
            "setup codeformer": 0.10487008094787598,
            "setup gfpgan": 0.03128409385681152,
            "set samplers": 0.0,
            "list extensions": 0.0,
            "restore config state file": 0.0,
            "list SD models": 0.06757664680480957,
            "list localizations": 0.0,
            "load scripts/custom_code.py": 0.015624284744262695,
            "load scripts/img2imgalt.py": 0.0,
            "load scripts/loopback.py": 0.0,
            "load scripts/outpainting_mk_2.py": 0.0,
            "load scripts/poor_mans_outpainting.py": 0.0,
            "load scripts/postprocessing_codeformer.py": 0.0,
            "load scripts/postprocessing_gfpgan.py": 0.0,
            "load scripts/postprocessing_upscale.py": 0.0,
            "load scripts/prompt_matrix.py": 0.0,
            "load scripts/prompts_from_file.py": 0.0,
            "load scripts/refiner.py": 0.0,
            "load scripts/sd_upscale.py": 0.0,
            "load scripts/seed.py": 0.0,
            "load scripts/xyz_grid.py": 0.0,
            "load scripts/sd-webui-ar.py": 0.0,
            "load scripts/batchCheckpointsPrompt.py": 0.0156252384185791,
            "load scripts/BatchParams.py": 0.0,
            "load scripts/CivitaihelperPrompts.py": 0.0,
            "load scripts/Logger.py": 0.0,
            "load scripts/Save.py": 0.0,
            "load scripts/Utils.py": 0.0,
            "load scripts/settings.py": 1.016012191772461,
            "load scripts/civitai_helper.py": 0.04943561553955078,
            "load scripts/StyleSelectorXL.py": 0.06249713897705078,
            "load scripts/dynamic_prompting.py": 0.03782081604003906,
            "load scripts/!adetailer.py": 2.0369460582733154,
            "load scripts/tilediffusion.py": 0.0,
            "load scripts/tilevae.py": 0.0,
            "load scripts/adapter.py": 0.0,
            "load scripts/api.py": 0.5474202632904053,
            "load scripts/batch_hijack.py": 0.0,
            "load scripts/cldm.py": 0.0,
            "load scripts/controlmodel_ipadapter.py": 0.0,
            "load scripts/controlnet.py": 0.16927409172058105,
            "load scripts/controlnet_diffusers.py": 0.0,
            "load scripts/controlnet_lllite.py": 0.0,
            "load scripts/controlnet_lora.py": 0.0,
            "load scripts/controlnet_model_guess.py": 0.0,
            "load scripts/controlnet_version.py": 0.0,
            "load scripts/external_code.py": 0.0,
            "load scripts/global_state.py": 0.0,
            "load scripts/hook.py": 0.0,
            "load scripts/infotext.py": 0.0,
            "load scripts/logging.py": 0.0,
            "load scripts/lvminthin.py": 0.0,
            "load scripts/movie2movie.py": 0.0,
            "load scripts/processor.py": 0.0,
            "load scripts/utils.py": 0.0,
            "load scripts/xyz_grid_support.py": 0.0,
            "load scripts/cimage.py": 0.0,
            "load scripts/faceswap.py": 0.0,
            "load scripts/roop_logging.py": 0.015624284744262695,
            "load scripts/roop_version.py": 0.0,
            "load scripts/swapper.py": 0.0,
            "load scripts/image_browser.py": 0.05338907241821289,
            "load scripts/tagger.py": 0.10026717185974121,
            "load scripts/ultimate-upscale.py": 0.0,
            "load scripts/ldsr_model.py": 0.04687380790710449,
            "load scripts/lora_script.py": 0.20015931129455566,
            "load scripts/scunet_model.py": 0.022171735763549805,
            "load scripts/swinir_model.py": 0.031249284744262695,
            "load scripts/hotkey_config.py": 0.015598058700561523,
            "load scripts/extra_options_section.py": 0.0,
            "load scripts": 4.435988426208496,
            "load upscalers": 0.0,
            "refresh VAE": 0.0,
            "refresh textual inversion templates": 0.0,
            "scripts list_optimizers": 0.0,
            "scripts list_unets": 0.0,
            "reload hypernetworks": 0.0,
            "initialize extra networks": 0.01599431037902832,
            "scripts before_ui_callback": 0.0,
            "create ui": 2.5042202472686768,
            "gradio launch": 0.4093282222747803,
            "add APIs": 0.0,
            "app_started_callback/api.py": 0.0,
            "app_started_callback/tagger.py": 0.0,
            "app_started_callback/lora_script.py": 0.0,
            "app_started_callback": 0.0
        }
    },
    "Packages": [
        "-rotobuf==3.20.0",
        "absl-py==1.4.0",
        "accelerate==0.21.0",
        "addict==2.4.0",
        "aenum==3.1.15",
        "aiofiles==23.1.0",
        "aiohttp==3.8.5",
        "aiosignal==1.3.1",
        "albumentations==1.3.1",
        "altair==5.0.1",
        "antlr4-python3-runtime==4.9.3",
        "anyio==3.7.1",
        "astunparse==1.6.3",
        "async-timeout==4.0.2",
        "attrs==23.1.0",
        "basicsr==1.4.2",
        "beautifulsoup4==4.12.2",
        "bidict==0.22.1",
        "blendmodes==2022",
        "boltons==23.0.0",
        "cachetools==5.3.1",
        "certifi==2023.7.22",
        "cffi==1.15.1",
        "charset-normalizer==3.2.0",
        "clean-fid==0.1.35",
        "click==8.1.6",
        "clip==1.0",
        "colorama==0.4.6",
        "colored==2.2.3",
        "coloredlogs==15.0.1",
        "contourpy==1.1.0",
        "cssselect2==0.7.0",
        "cycler==0.11.0",
        "cython==3.0.2",
        "deepdanbooru==1.0.2",
        "deprecation==2.1.0",
        "dynamicprompts==0.29.0",
        "easydict==1.10",
        "einops==0.4.1",
        "exceptiongroup==1.1.2",
        "facexlib==0.3.0",
        "fastapi==0.94.0",
        "ffmpy==0.3.1",
        "filelock==3.12.2",
        "filterpy==1.4.5",
        "flatbuffers==23.5.26",
        "fonttools==4.41.1",
        "frozenlist==1.4.0",
        "fsspec==2023.6.0",
        "ftfy==6.1.1",
        "future==0.18.3",
        "fvcore==0.1.5.post20221221",
        "gast==0.5.4",
        "gdown==4.7.1",
        "gfpgan==1.3.8",
        "gitdb==4.0.10",
        "gitpython==3.1.32",
        "google-auth-oauthlib==1.0.0",
        "google-auth==2.22.0",
        "google-pasta==0.2.0",
        "gradio-client==0.5.0",
        "gradio==3.41.2",
        "grpcio==1.56.2",
        "h11==0.12.0",
        "h5py==3.9.0",
        "httpcore==0.15.0",
        "httpx==0.24.1",
        "huggingface-hub==0.16.4",
        "humanfriendly==10.0",
        "idna==3.4",
        "ifnude==0.0.3",
        "imageio==2.31.1",
        "importlib-metadata==6.8.0",
        "importlib-resources==6.1.0",
        "inflection==0.5.1",
        "insightface==0.7.3",
        "iopath==0.1.9",
        "jinja2==3.1.2",
        "joblib==1.3.2",
        "jsonmerge==1.8.0",
        "jsonschema-specifications==2023.7.1",
        "jsonschema==4.18.4",
        "keras==2.14.0",
        "kiwisolver==1.4.4",
        "kornia==0.6.7",
        "lark==1.1.2",
        "lazy-loader==0.3",
        "libclang==16.0.6",
        "lightning-utilities==0.9.0",
        "linkify-it-py==2.0.2",
        "llvmlite==0.40.1",
        "lmdb==1.4.1",
        "lpips==0.1.4",
        "lxml==4.9.3",
        "markdown-it-py==2.2.0",
        "markdown==3.4.4",
        "markupsafe==2.1.3",
        "matplotlib==3.7.2",
        "mdit-py-plugins==0.3.3",
        "mdurl==0.1.2",
        "mediapipe==0.10.7",
        "ml-dtypes==0.2.0",
        "mpmath==1.3.0",
        "multidict==6.0.4",
        "networkx==3.1",
        "numba==0.57.1",
        "numpy==1.23.5",
        "nvidia-cublas-cu11==11.11.3.6",
        "nvidia-cuda-nvrtc-cu11==11.8.89",
        "nvidia-cuda-runtime-cu11==11.8.89",
        "nvidia-cudnn-cu11==8.9.4.25",
        "oauthlib==3.2.2",
        "omegaconf==2.2.3",
        "onnx-graphsurgeon==0.3.27",
        "onnx==1.14.0",
        "onnxruntime-gpu==1.16.0",
        "onnxruntime==1.15.0",
        "open-clip-torch==2.20.0",
        "opencv-contrib-python==4.8.0.76",
        "opencv-python-headless==4.8.1.78",
        "opencv-python==4.7.0.72",
        "opt-einsum==3.3.0",
        "orjson==3.9.2",
        "packaging==23.1",
        "pandas==2.0.3",
        "piexif==1.1.3",
        "pillow==9.5.0",
        "pip==23.3.1",
        "platformdirs==3.9.1",
        "polygraphy==0.49.0",
        "portalocker==2.8.2",
        "prettytable==3.9.0",
        "protobuf==3.20.3",
        "psutil==5.9.5",
        "py-cpuinfo==9.0.0",
        "pyasn1-modules==0.3.0",
        "pyasn1==0.5.0",
        "pycparser==2.21",
        "pydantic==1.10.12",
        "pydub==0.25.1",
        "pygments==2.15.1",
        "pyparsing==3.0.9",
        "pyreadline3==3.4.1",
        "pysocks==1.7.1",
        "python-dateutil==2.8.2",
        "python-engineio==4.7.1",
        "python-multipart==0.0.6",
        "python-socketio==5.7.2",
        "pytorch-lightning==1.9.4",
        "pytz==2023.3",
        "pywavelets==1.4.1",
        "pywin32==306",
        "pyyaml==6.0.1",
        "qudida==0.0.4",
        "realesrgan==0.3.0",
        "referencing==0.30.0",
        "regex==2023.6.3",
        "reportlab==4.0.5",
        "requests-oauthlib==1.3.1",
        "requests==2.31.0",
        "resize-right==0.0.2",
        "rich==13.5.3",
        "rpds-py==0.9.2",
        "rsa==4.9",
        "safetensors==0.3.1",
        "scikit-image==0.21.0",
        "scikit-learn==1.3.1",
        "scipy==1.11.1",
        "seaborn==0.12.2",
        "semantic-version==2.10.0",
        "send2trash==1.8.2",
        "sentencepiece==0.1.99",
        "setuptools==65.5.0",
        "simple-websocket==1.0.0",
        "six==1.16.0",
        "smmap==5.0.0",
        "sniffio==1.3.0",
        "sounddevice==0.4.6",
        "soupsieve==2.4.1",
        "starlette==0.26.1",
        "svglib==1.5.1",
        "sympy==1.12",
        "tabulate==0.9.0",
        "tb-nightly==2.14.0a20230727",
        "tensorboard-data-server==0.7.1",
        "tensorboard==2.14.1",
        "tensorflow-estimator==2.14.0",
        "tensorflow-intel==2.14.0",
        "tensorflow-io-gcs-filesystem==0.31.0",
        "tensorflow==2.14.0",
        "tensorrt-bindings==9.0.1.post11.dev4",
        "tensorrt-libs==9.0.1.post11.dev4",
        "tensorrt==9.0.1.post11.dev4",
        "termcolor==2.3.0",
        "thop==0.1.1.post2209072238",
        "threadpoolctl==3.2.0",
        "tifffile==2023.7.18",
        "timm==0.9.2",
        "tinycss2==1.2.1",
        "tokenizers==0.13.3",
        "tomesd==0.1.3",
        "tomli==2.0.1",
        "toolz==0.12.0",
        "torch==2.0.1+cu118",
        "torchdiffeq==0.2.3",
        "torchmetrics==1.0.1",
        "torchsde==0.2.5",
        "torchvision==0.15.2+cu118",
        "tqdm==4.65.0",
        "trampoline==0.1.2",
        "transformers==4.30.2",
        "typing-extensions==4.7.1",
        "tzdata==2023.3",
        "uc-micro-py==1.0.2",
        "ultralytics==8.0.199",
        "urllib3==1.26.16",
        "uvicorn==0.23.1",
        "wcwidth==0.2.6",
        "webencodings==0.5.1",
        "websocket-client==1.6.3",
        "websockets==11.0.3",
        "werkzeug==2.3.6",
        "wheel==0.41.0",
        "wrapt==1.14.1",
        "wsproto==1.2.0",
        "xformers==0.0.20",
        "yacs==0.1.8",
        "yapf==0.40.1",
        "yarl==1.9.2",
        "zipp==3.16.2"
    ]
}



### What browsers do you use to access the UI ?

Mozilla Firefox

### Console logs

```Shell
nothing relevant
```


### Additional information

_No response_


Discussion:
This is because when you click the folder "SFW/" its actually doing a search for any Lora with "SFW/" in the name. So it found that the folder "NSFW/" contains "SFW/".

I have tested it "/SFW/" this should show you only this one folder. So that may be the fix, instead of just one forward slash when clicking folders, there should be 2, on in front and one in back.

Resolving patch:
diff --git a/modules/shared_options.py b/modules/shared_options.py
--- a/modules/shared_options.py
+++ b/modules/shared_options.py
@@ -224,6 +224,7 @@
 
 options_templates.update(options_section(('extra_networks', "Extra Networks"), {
     "extra_networks_show_hidden_directories": OptionInfo(True, "Show hidden directories").info("directory is hidden if its name starts with \".\"."),
+    "extra_networks_dir_button_function": OptionInfo(False, "Add a '/' to the beginning of directory buttons").info("Buttons will display the contents of the selected directory without acting as a search filter."),
     "extra_networks_hidden_models": OptionInfo("When searched", "Show cards for models in hidden directories", gr.Radio, {"choices": ["Always", "When searched", "Never"]}).info('"When searched" option will only show the item when the search string has 4 characters or more'),
     "extra_networks_default_multiplier": OptionInfo(1.0, "Default multiplier for extra networks", gr.Slider, {"minimum": 0.0, "maximum": 2.0, "step": 0.01}),
     "extra_networks_card_width": OptionInfo(0, "Card width for Extra Networks").info("in pixels"),
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py
--- a/modules/ui_extra_networks.py
+++ b/modules/ui_extra_networks.py
@@ -138,8 +138,13 @@ def create_html(self, tabname):
                         continue
 
                     subdir = os.path.abspath(x)[len(parentdir):].replace("\\", "/")
-                    while subdir.startswith("/"):
-                        subdir = subdir[1:]
+
+                    if shared.opts.extra_networks_dir_button_function:
+                        if not subdir.startswith("/"):
+                            subdir = "/" + subdir
+                    else:
+                        while subdir.startswith("/"):
+                            subdir = subdir[1:]
 
                     is_empty = len(os.listdir(x)) == 0
                     if not is_empty and not subdir.endswith("/"):


Test patch: