MCPcopy Create free account
hub / github.com/horseee/DeepCache / load_sub_model

Function load_sub_model

DeepCache/svd/pipeline_utils.py:411–528  ·  view source on GitHub ↗

Helper method to load the module `name` from `library_name` and `class_name`

(
    library_name: str,
    class_name: str,
    importable_classes: List[Any],
    pipelines: Any,
    is_pipeline_module: bool,
    pipeline_class: Any,
    torch_dtype: torch.dtype,
    provider: Any,
    sess_options: Any,
    device_map: Optional[Union[Dict[str, torch.device], str]],
    max_memory: Optional[Dict[Union[int, str], Union[int, str]]],
    offload_folder: Optional[Union[str, os.PathLike]],
    offload_state_dict: bool,
    model_variants: Dict[str, str],
    name: str,
    from_flax: bool,
    variant: str,
    low_cpu_mem_usage: bool,
    cached_folder: Union[str, os.PathLike],
    revision: str = None,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

from_pretrainedMethod · 0.70

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…