Skip to content

Commit f95c320

Browse files
committed
addreess more review comments
1 parent 59abd95 commit f95c320

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/source/en/modular_diffusers/getting_started.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ With Modular Diffusers, we introduce a unified pipeline system that simplifies h
2121
In this guide, we will focus on how to build end-to-end pipelines using blocks we officially support at diffusers 🧨! We will show you how to write your own pipeline blocks and go into more details on how they work under the hood in this [guide](./write_own_pipeline_block.md). For advanced users who want to build complete workflows from scratch, we provide an end-to-end example in the [Developer Guide](./end_to_end.md) that covers everything from writing custom pipeline blocks to deploying your workflow as a UI node.
2222

2323
Let's get started! The Modular Diffusers Framework consists of three main components:
24-
- ModularPipelineBlocks
25-
- PipelineState & BlockState
26-
- ModularPipeline
24+
- ModularPipelineBlocks: Building blocks for your workflow, each block defines inputs/outputs and computation steps. These are just definitions and not runnable.
25+
- PipelineState & BlockState: Store and manage data as it flows through the pipeline.
26+
- ModularPipeline: Loads models and runs the computation steps. You convert blocks to pipelines to make them executable.
2727

2828
## ModularPipelineBlocks
2929

@@ -68,7 +68,9 @@ StableDiffusionXLTextEncoderStep(
6868
)
6969
```
7070

71-
More commonly, you can create a `SequentialPipelineBlocks` using a block classes preset from 🧨 Diffusers.
71+
More commonly, you need multiple blocks to build your workflow. You can create a `SequentialPipelineBlocks` using block class presets from 🧨 Diffusers.
72+
73+
`TEXT2IMAGE_BLOCKS` is a predefined dictionary containing all the blocks needed for a complete text-to-image pipeline (text encoding, denoising, decoding, etc.). We will see more details soon.
7274

7375
```py
7476
from diffusers.modular_pipelines import SequentialPipelineBlocks
@@ -171,7 +173,7 @@ Note that both the block classes preset and the `sub_blocks` attribute are `Inse
171173

172174
**Add a block:**
173175
```py
174-
# Add a block class to the preset
176+
# BLOCKS is a block class preset, you need to add class to it
175177
BLOCKS.insert("block_name", BlockClass, index)
176178
# Add a block instance to the `sub_blocks` attribute
177179
t2i_blocks.sub_blocks.insert("block_name", block_instance, index)
@@ -363,6 +365,8 @@ modular_repo_id = "YiYiXu/modular-loader-t2i-0704"
363365
t2i_pipeline = t2i_blocks.init_pipeline(modular_repo_id)
364366
```
365367

368+
The `init_pipeline()` method creates a ModularPipeline and loads component specifications from the repository's `modular_model_index.json` file, but doesn't load the actual models yet.
369+
366370
<Tip>
367371

368372
💡 We recommend using `ModularPipeline` with Component Manager by passing a `components_manager`:

0 commit comments

Comments
 (0)