fix(dicts): move default dicts directory to data/dicts

Tag dictionaries are lookup data, not model weights — place them
alongside cache.json and metadata.json in the data/ folder instead
of inside the models directory.
This commit is contained in:
CalamitousFelicitousness
2026-03-23 22:25:06 +00:00
parent 9343768d78
commit d26f8560c8
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ class Api:
# dicts api
from modules.api import dicts as dicts_api
dicts_api.init(getattr(shared.opts, 'dicts_dir', '') or os.path.join(paths.models_path, 'dicts'))
dicts_api.init(getattr(shared.opts, 'dicts_dir', '') or os.path.join(paths.data_path, 'data', 'dicts'))
dicts_api.register_api(self.app)
# gallery api
+2 -2
View File
@@ -54,7 +54,7 @@ def get_openvino_device_list():
def list_dict_names():
"""Return list of available tag dictionary names (JSON filenames without extension)."""
from modules import shared, paths as paths_module
dicts_dir = getattr(shared.opts, 'dicts_dir', None) or os.path.join(paths_module.models_path, 'dicts')
dicts_dir = getattr(shared.opts, 'dicts_dir', None) or os.path.join(paths_module.data_path, 'data', 'dicts')
if not os.path.isdir(dicts_dir):
return []
return sorted(
@@ -400,7 +400,7 @@ def create_settings(cmd_opts):
"lora_dir": OptionInfo(os.path.join(paths.models_path, 'Lora'), "Folder with LoRA network(s)", folder=True),
"styles_dir": OptionInfo(os.path.join(paths.models_path, 'styles'), "File or Folder with user-defined styles", folder=True),
"wildcards_dir": OptionInfo(os.path.join(paths.models_path, 'wildcards'), "Folder with user-defined wildcards", folder=True),
"dicts_dir": OptionInfo(os.path.join(paths.models_path, 'dicts'), "Folder with tag dictionaries", folder=True),
"dicts_dir": OptionInfo(os.path.join(paths.data_path, 'data', 'dicts'), "Folder with tag dictionaries", folder=True),
"embeddings_dir": OptionInfo(os.path.join(paths.models_path, 'embeddings'), "Folder with textual inversion embeddings", folder=True),
"control_dir": OptionInfo(os.path.join(paths.models_path, 'control'), "Folder with Control models", folder=True),
"yolo_dir": OptionInfo(os.path.join(paths.models_path, 'yolo'), "Folder with Yolo models", folder=True),