From a4815ab1c8fdb6025d2bb706e80b76f472a635cc Mon Sep 17 00:00:00 2001 From: DN6 Date: Wed, 8 Oct 2025 13:53:54 +0530 Subject: [PATCH] update --- docs/source/en/modular_diffusers/custom_blocks.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/source/en/modular_diffusers/custom_blocks.md b/docs/source/en/modular_diffusers/custom_blocks.md index fb41c1d534..f94b9a1df1 100644 --- a/docs/source/en/modular_diffusers/custom_blocks.md +++ b/docs/source/en/modular_diffusers/custom_blocks.md @@ -250,7 +250,8 @@ class Florence2ImageAnnotatorBlock(ModularPipelineBlocks): Save the custom block to the Hub, from either the CLI or with the [`push_to_hub`] method, so you can easily share and reuse it. -1. From the CLI + + ```shell # In the folder with the `block.py` file, run: @@ -262,8 +263,8 @@ Then upload the block to the Hub: ```shell hf upload . . ``` - -2. From Python + + ```py from block import Florence2ImageAnnotatorBlock @@ -271,6 +272,8 @@ block = Florence2ImageAnnotatorBlock() block.push_to_hub("") ``` + + Load the custom block with [`~ModularPipelineBlocks.from_pretrained`] and set `trust_remote_code=True`.