From 76265b4d35be4f52bf8ef1254274cea259a5e930 Mon Sep 17 00:00:00 2001 From: Lucain Pouget Date: Thu, 12 Dec 2024 10:42:43 +0100 Subject: [PATCH] add arg --- docs/source/en/package_reference/serialization.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/en/package_reference/serialization.md b/docs/source/en/package_reference/serialization.md index b50c26ed10..c180114388 100644 --- a/docs/source/en/package_reference/serialization.md +++ b/docs/source/en/package_reference/serialization.md @@ -34,7 +34,7 @@ For more flexibility, you can use [`export_entries_as_dduf`] and pass a list of # Export specific files from the local disk. >>> from huggingface_hub import export_entries_as_dduf >>> export_entries_as_dduf( -... "stable-diffusion-v1-4-FP16.dduf", +... dduf_path="stable-diffusion-v1-4-FP16.dduf", ... entries=[ # List entries to add to the DDUF file (here, only FP16 weights) ... ("model_index.json", "path/to/model_index.json"), ... ("vae/config.json", "path/to/vae/config.json"), @@ -68,7 +68,7 @@ The `entries` parameter also supports passing an iterable of paths or bytes. Thi ... yield "text_encoder/model.safetensors", safetensors.torch.save(pipe.text_encoder.state_dict()) ... # ... add more entries here ->>> export_entries_as_dduf("stable-diffusion-v1-4.dduf", entries=as_entries(pipe)) +>>> export_entries_as_dduf(dduf_path="stable-diffusion-v1-4.dduf", entries=as_entries(pipe)) ``` **Note:** in practice, `diffusers` provides a method to directly serialize a pipeline in a DDUF file. The snippet above is only meant as an example.