# DiffusionPipeline에서 가져오기

[DiffusionPipeline](/docs/diffusers/main/ko/api/pipelines/overview#diffusers.DiffusionPipeline)에 익숙하고 [ModularPipeline](/docs/diffusers/main/ko/api/modular_diffusers/pipeline#diffusers.ModularPipeline)을 처음 사용하는 경우, 몇 가지 동작 방식이 다릅니다. [quickstart](./quickstart)를 진행하기 전에 아래 내용을 참고해 두시기 바랍니다.

- **Loading is lazy and flexible.** [from_pretrained()](/docs/diffusers/main/ko/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/main/ko/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/main/ko/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/main/ko/api/modular_diffusers/pipeline#diffusers.ModularPipeline) reads a different index, `modular_model_index.json`**, but it also works with a repository that only has a `model_index.json`, as long as the model has a modular pipeline. The reverse is not true: [DiffusionPipeline](/docs/diffusers/main/ko/api/pipelines/overview#diffusers.DiffusionPipeline) and the `AutoPipeline` classes don't work with a repository that only has a `modular_model_index.json`.
- **호출은 파이프라인 상태를 반환합니다**. 이 상태에는 중간 값(`prompt_embeds`, `latents`, ...)도 포함됩니다. `output` 인수를 사용해 필요한 항목을 요청하세요. `output="images"` 또는 `output=["images", "latents"]`처럼 사용할 수 있으며, [quickstart](./quickstart#run-a-pipeline)에서처럼 상태의 속성을 읽을 수도 있습니다. [States](./modular_diffusers_states)를 참조하세요.
- **`guider` 구성 요소에서 Classifier-free guidance가 지원되며**, `guidance_scale` 호출 인수가 아닙니다: `pipe.update_components(guider=ClassifierFreeGuidance(guidance_scale=5.0))`. [guiders 가이드](../using-diffusers/guiders)를 참조하세요.
- **`callback_on_step_end`은 없습니다.** 대신, 노이즈 제거 루프에 블록을 삽입하여 기존 콜백 함수를 사용할 수 있습니다. 콜백 가이드의 [모듈형 파이프라인](../using-diffusers/callback#modular-pipelines)을 참고하세요.
- **파이프라인은 블록의 그래프**이며, [init_pipeline()](/docs/diffusers/main/ko/api/modular_diffusers/pipeline_blocks#diffusers.ModularPipelineBlocks.init_pipeline)로 빌드하기 전에 변경(추출, 삽입, 교체)할 수 있습니다. `pipe.blocks`는 복사본을 반환하므로 먼저 블록을 편집하세요. [새 워크플로우 구성](./quickstart#compose-new-workflows)을 참조하세요.
- **Offloading is handled by a [ComponentsManager](/docs/diffusers/main/ko/api/modular_diffusers/pipeline_components#diffusers.ComponentsManager)**, which can serve several pipelines that share components. See the [ComponentsManager guide](./components_manager#offloading).

