Allow changing T5 in extra_model_paths
This commit is contained in:
@@ -136,6 +136,8 @@ For faster loading/smaller file sizes, you may pick one of the following alterna
|
||||
- [FP16 converted version](https://huggingface.co/theunlikely/t5-v1_1-xxl-fp16/tree/main) - Same layout as the original, download both safetensor files as well as the `*.index.json` and `config.json` files.
|
||||
- [BF16 converter version](https://huggingface.co/city96/t5-v1_1-xxl-encoder-bf16/tree/main) - Merged into a single safetensor, only `model.safetensors` (+`config.json` for folder mode) are reqired.
|
||||
|
||||
To move T5 to a different drive/folder, do the same as you would when moving checkpoints, but add ` t5: t5` to `extra_model_paths.yaml` and create a directory called "t5" in the alternate path specified in the `base_path` variable.
|
||||
|
||||
### Usage
|
||||
|
||||
Loaded onto the CPU, it'll use about 22GBs of system RAM. Depending on which weights you use, it might use slightly more during loading.
|
||||
|
||||
+4
-2
@@ -7,13 +7,15 @@ from .loader import load_t5
|
||||
from ..utils.dtype import string_to_dtype
|
||||
|
||||
# initialize custom folder path
|
||||
# TODO: integrate with `extra_model_paths.yaml`
|
||||
os.makedirs(
|
||||
os.path.join(folder_paths.models_dir,"t5"),
|
||||
exist_ok = True,
|
||||
)
|
||||
folder_paths.folder_names_and_paths["t5"] = (
|
||||
[os.path.join(folder_paths.models_dir,"t5")],
|
||||
[
|
||||
os.path.join(folder_paths.models_dir,"t5"),
|
||||
*folder_paths.folder_names_and_paths.get("t5", [[],set()])[0]
|
||||
],
|
||||
folder_paths.supported_pt_extensions
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user