|
58 | 58 | PushToHubMixin, |
59 | 59 | _get_detailed_type, |
60 | 60 | _is_valid_type, |
61 | | - deprecate, |
62 | 61 | is_accelerate_available, |
63 | 62 | is_accelerate_version, |
64 | 63 | is_bitsandbytes_version, |
|
115 | 114 |
|
116 | 115 | SUPPORTED_DEVICE_MAP = ["balanced"] + [get_device(), "cpu"] |
117 | 116 |
|
118 | | -_DDUF_DEPRECATION_MESSAGE = ( |
119 | | - "Loading pipelines from DDUF files is deprecated and DDUF support will be removed entirely. " |
120 | | - "Please save and load your pipelines using the standard Diffusers directory format instead." |
121 | | -) |
122 | | - |
123 | 117 | logger = logging.get_logger(__name__) |
124 | 118 |
|
125 | 119 |
|
@@ -736,8 +730,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: str | os.PathLike, **kwa |
736 | 730 | Load weights from a specified variant filename such as `"fp16"` or `"ema"`. This is ignored when |
737 | 731 | loading `from_flax`. |
738 | 732 | dduf_file(`str`, *optional*): |
739 | | - Load weights from the specified dduf file. <Deprecated> This argument is deprecated and will be removed |
740 | | - in version 0.41.0. </Deprecated> |
| 733 | + Load weights from the specified dduf file. |
741 | 734 | disable_mmap ('bool', *optional*, defaults to 'False'): |
742 | 735 | Whether to disable mmap when loading a Safetensors model. This option can perform better when the model |
743 | 736 | is on a network mount or hard drive, which may not handle the seeky-ness of mmap very well. |
@@ -850,7 +843,6 @@ def from_pretrained(cls, pretrained_model_name_or_path: str | os.PathLike, **kwa |
850 | 843 | ) |
851 | 844 |
|
852 | 845 | if dduf_file: |
853 | | - deprecate("dduf_file", "0.41.0", _DDUF_DEPRECATION_MESSAGE) |
854 | 846 | if custom_pipeline: |
855 | 847 | raise NotImplementedError("Custom pipelines are not supported with DDUF at the moment.") |
856 | 848 | if load_connected_pipeline: |
@@ -1580,8 +1572,7 @@ def download(cls, pretrained_model_name, **kwargs) -> str | os.PathLike: |
1580 | 1572 | Load weights from a specified variant filename such as `"fp16"` or `"ema"`. This is ignored when |
1581 | 1573 | loading `from_flax`. |
1582 | 1574 | dduf_file(`str`, *optional*): |
1583 | | - Load weights from the specified DDUF file. <Deprecated> This argument is deprecated and will be removed |
1584 | | - in version 0.41.0. </Deprecated> |
| 1575 | + Load weights from the specified DDUF file. |
1585 | 1576 | use_safetensors (`bool`, *optional*, defaults to `None`): |
1586 | 1577 | If set to `None`, the safetensors weights are downloaded if they're available **and** if the |
1587 | 1578 | safetensors library is installed. If set to `True`, the model is forcibly loaded from safetensors |
@@ -1625,7 +1616,6 @@ def download(cls, pretrained_model_name, **kwargs) -> str | os.PathLike: |
1625 | 1616 | use_flashpack = kwargs.pop("use_flashpack", False) |
1626 | 1617 |
|
1627 | 1618 | if dduf_file: |
1628 | | - deprecate("dduf_file", "0.41.0", _DDUF_DEPRECATION_MESSAGE) |
1629 | 1619 | if custom_pipeline: |
1630 | 1620 | raise NotImplementedError("Custom pipelines are not supported with DDUF at the moment.") |
1631 | 1621 | if load_connected_pipeline: |
|
0 commit comments