# DiffusionPipeline から

[DiffusionPipeline](/docs/diffusers/v0.43.0/ja/api/pipelines/overview#diffusers.DiffusionPipeline) に慣れている方で、[ModularPipeline](/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline#diffusers.ModularPipeline) を初めて扱う場合は、いくつか動作が異なります。[クイックスタート](./quickstart) を進める前に、以下の点をご確認ください。

- **Loading is lazy and flexible.** [from_pretrained()](/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline#diffusers.ModularPipeline.from_pretrained) builds the pipeline from the repository's `modular_model_index.json` without loading any weights. [load_components()](/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline#diffusers.ModularPipeline.load_components) then loads them, and it doesn't have to be all at once: by default it loads everything, but you can load only the components you name with `names`, or the set one workflow needs with `workflow`. [update_components()](/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline#diffusers.ModularPipeline.update_components) lets you reuse a component you already have, or one that differs from the repository's spec. See [Loading components](./modular_pipeline#loading-components) and [Updating components](./modular_pipeline#updating-components).
- **[ModularPipeline](/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline#diffusers.ModularPipeline)は別のインデックスである`modular_model_index.json`**を読み取りますが、モデルにモジュラーパイプラインが存在する限り、`model_index.json`のみを含むリポジトリでも動作します。逆は成り立ちません。[DiffusionPipeline](/docs/diffusers/v0.43.0/ja/api/pipelines/overview#diffusers.DiffusionPipeline)および`AutoPipeline`クラスは、`modular_model_index.json`のみを含むリポジトリでは動作しません。
- **呼び出しはパイプラインの状態を返します**。この状態には中間値（`prompt_embeds`、`latents` など）も保持されています。`output` 引数で必要なものを指定します。`output="images"` や `output=["images", "latents"]` のように指定するか、[クイックスタート](./quickstart#run-a-pipeline) にあるように状態の属性を読み取ります。[States](./modular_diffusers_states) を参照してください。
- **Classifier-free guidance is supported in the `guider` component**, not a `guidance_scale` call argument: `pipe.update_components(guider=ClassifierFreeGuidance(guidance_scale=5.0))`. See the [guiders guide](../using-diffusers/guiders).
- **`callback_on_step_end` は存在しません**。ただし、デノイジングループにブロックを挿入して、既存のコールバック関数を使用できます。[コールバックガイド](../using-diffusers/callback#modular-pipelines)の「Modular pipelines」を参照してください。
- **パイプラインはブロックのグラフ**であり、[init_pipeline()](/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline_blocks#diffusers.ModularPipelineBlocks.init_pipeline)でビルドする前に変更（pop、insert、replace）できます。`pipe.blocks`はコピーを返すため、まずブロックを編集してください。[新しいワークフローの作成](./quickstart#compose-new-workflows)を参照してください。
- オフロードは、コンポーネントを共有する複数のパイプラインに対応できる**[ComponentsManager](/docs/diffusers/v0.43.0/ja/api/modular_diffusers/pipeline_components#diffusers.ComponentsManager)**によって処理されます。[ComponentsManager ガイド](./components_manager#offloading)を参照してください。

