Skip to content

Commit 005713f

Browse files
committed
FromSingleFileMixin from_single_file
1 parent 101bf73 commit 005713f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/diffusers/loaders/single_file.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from huggingface_hub import snapshot_download
2020
from huggingface_hub.utils import LocalEntryNotFoundError, validate_hf_hub_args
2121
from packaging import version
22+
from typing_extensions import Self
2223

2324
from ..utils import deprecate, is_transformers_available, logging
2425
from .single_file_utils import (
@@ -269,7 +270,7 @@ class FromSingleFileMixin:
269270

270271
@classmethod
271272
@validate_hf_hub_args
272-
def from_single_file(cls, pretrained_model_link_or_path, **kwargs):
273+
def from_single_file(cls, pretrained_model_link_or_path, **kwargs) -> Self:
273274
r"""
274275
Instantiate a [`DiffusionPipeline`] from pretrained pipeline weights saved in the `.ckpt` or `.safetensors`
275276
format. The pipeline is set in evaluation mode (`model.eval()`) by default.

0 commit comments

Comments
 (0)