mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
handle files = str case
This commit is contained in:
@@ -47,6 +47,8 @@ def load_streamer(files: list[str], state_dict: dict = None, key_mapping: dict =
|
||||
|
||||
def load_files(files: list[str], state_dict: dict = None, key_mapping: dict = None, device: torch.device = "cpu", method: str = None) -> dict:
|
||||
# note: files is list-of-files within a module for chunked loading, not accross model
|
||||
if isinstance(files, str):
|
||||
files = [files]
|
||||
if method is None:
|
||||
method = 'safetensors'
|
||||
if state_dict is None:
|
||||
|
||||
Reference in New Issue
Block a user