This makes absolutely no sense, when the model_name_or_path is actually validated against the static list later on
def from_pretrained(model_name_or_path, device=None, model_half=True):
if model_name_or_path not in all_models: <-- This cannot ever contain the local path
raise ValueError(
f"Unknown model '{model_name_or_path}'. Valid models: {list(all_models)}"
)
This makes absolutely no sense, when the model_name_or_path is actually validated against the static list later on
def from_pretrained(model_name_or_path, device=None, model_half=True):
if model_name_or_path not in all_models: <-- This cannot ever contain the local path
raise ValueError(
f"Unknown model '{model_name_or_path}'. Valid models: {list(all_models)}"
)