Skip to content

Commit a4dd7fd

Browse files
committed
add clarity in documentation for device_map
1 parent f46abfe commit a4dd7fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/diffusers/models/modeling_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,10 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
821821
822822
Set `device_map="auto"` to have 🤗 Accelerate automatically compute the most optimized `device_map`. For
823823
more information about each option see [designing a device
824-
map](https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map).
824+
map](https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map). You can
825+
also refer to the [Diffusers-specific
826+
documentation](https://huggingface.co/docs/diffusers/main/en/training/distributed_inference#model-sharding)
827+
for more concrete examples.
825828
max_memory (`Dict`, *optional*):
826829
A dictionary device identifier for the maximum memory. Will default to the maximum memory available for
827830
each GPU and the available CPU RAM if unset.

0 commit comments

Comments
 (0)