>>106627935
# get custom model path
def get_custom_model_folder():
"""
Update extra network directories with user-specified values.
"""
util.printD("Get Custom Model Folder")
if hasattr(shared.cmd_opts, 'embeddings_dir') and shared.cmd_opts.embeddings_dir and os.path.isdir(shared.cmd_opts.embeddings_dir):
folders["ti"] = shared.cmd_opts.embeddings_dir
if hasattr(shared.cmd_opts, 'hypernetwork_dir') and shared.cmd_opts.hypernetwork_dir and os.path.isdir(shared.cmd_opts.hypernetwork_dir):
folders["hyper"] = shared.cmd_opts.hypernetwork_dir
if hasattr(shared.cmd_opts, 'ckpt_dir') and shared.cmd_opts.ckpt_dir and os.path.isdir(shared.cmd_opts.ckpt_dir):
folders["ckp"] = shared.cmd_opts.ckpt_dir
if hasattr(shared.cmd_opts, 'lora_dir') and shared.cmd_opts.lora_dir and os.path.isdir(shared.cmd_opts.lora_dir):
folders["lora"] = shared.cmd_opts.lora_dir
if hasattr(shared.cmd_opts, 'vae_dir') and shared.cmd_opts.vae_dir and os.path.isdir(shared.cmd_opts.vae_dir):
folders["vae"] = shared.cmd_opts.vae_dir
if util.get_opts("ch_dl_lyco_to_lora"):
folders["lycoris"] = folders["lora"]
return
try:
# Check for lyco_dir attribute before accessing
if hasattr(shared.cmd_opts, 'lyco_dir') and shared.cmd_opts.lyco_dir and os.path.isdir(shared.cmd_opts.lyco_dir):
folders["lycoris"] = shared.cmd_opts.lyco_dir
except AttributeError:
try:
# Fallback for backcompat attribute
if hasattr(shared.cmd_opts, 'lyco_dir_backcompat') and shared.cmd_opts.lyco_dir_backcompat and os.path.isdir(shared.cmd_opts.lyco_dir_backcompat):
folders["lycoris"] = shared.cmd_opts.lyco_dir_backcompat
except AttributeError:
# If neither exists, do nothing and let it use the default path
return
This fixed it for me on neo forge
Now kill yourself