feat(civitai): route text encoder files to te_dir

Versions bundle companion files typed by the file, not the model;
'Text Encoder' had no TYPE_MAP entry so companions landed in the
checkpoint folder where the loader never scans.
This commit is contained in:
CalamitousFelicitousness
2026-07-10 02:17:33 +01:00
parent 24683dc608
commit d087c3e687
+4 -1
View File
@@ -4,9 +4,12 @@ from pathlib import Path
from modules.logger import log
# Map CivitAI model types to shared.opts directory settings and fallback subfolder names
# Map CivitAI model types to shared.opts directory settings and fallback subfolder
# names. 'Text Encoder' is a file type, not a model type: versions bundle companion
# files, and clients route those by the file's own type.
TYPE_MAP = {
'Checkpoint': ('ckpt_dir', 'Stable-diffusion'),
'Text Encoder': ('te_dir', 'Text-encoder'),
'TextualInversion': ('embeddings_dir', 'embeddings'),
'Hypernetwork': ('hypernetwork_dir', 'hypernetworks'),
'AestheticGradient': ('ckpt_dir', 'Stable-diffusion'),