Buckets:
DiffusionPipeline에서 가져오기
DiffusionPipeline에 익숙하고 ModularPipeline을 처음 사용하는 경우, 몇 가지 동작 방식이 다릅니다. quickstart를 진행하기 전에 아래 내용을 참고해 두시기 바랍니다.
- Loading is lazy and flexible. from_pretrained() builds the pipeline from the repository's
modular_model_index.jsonwithout loading any weights. 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 withnames, or the set one workflow needs withworkflow. update_components() lets you reuse a component you already have, or one that differs from the repository's spec. See Loading components and Updating components. - ModularPipeline reads a different index,
modular_model_index.json, but it also works with a repository that only has amodel_index.json, as long as the model has a modular pipeline. The reverse is not true: DiffusionPipeline and theAutoPipelineclasses don't work with a repository that only has amodular_model_index.json. - 호출은 파이프라인 상태를 반환합니다. 이 상태에는 중간 값(
prompt_embeds,latents, ...)도 포함됩니다.output인수를 사용해 필요한 항목을 요청하세요.output="images"또는output=["images", "latents"]처럼 사용할 수 있으며, quickstart에서처럼 상태의 속성을 읽을 수도 있습니다. States를 참조하세요. guider구성 요소에서 Classifier-free guidance가 지원되며,guidance_scale호출 인수가 아닙니다:pipe.update_components(guider=ClassifierFreeGuidance(guidance_scale=5.0)). guiders 가이드를 참조하세요.callback_on_step_end은 없습니다. 대신, 노이즈 제거 루프에 블록을 삽입하여 기존 콜백 함수를 사용할 수 있습니다. 콜백 가이드의 모듈형 파이프라인을 참고하세요.- 파이프라인은 블록의 그래프이며, init_pipeline()로 빌드하기 전에 변경(추출, 삽입, 교체)할 수 있습니다.
pipe.blocks는 복사본을 반환하므로 먼저 블록을 편집하세요. 새 워크플로우 구성을 참조하세요. - Offloading is handled by a ComponentsManager, which can serve several pipelines that share components. See the ComponentsManager guide.
Xet Storage Details
- Size:
- 3.53 kB
- Xet hash:
- d94e94556579365f4b1bca9e26d42b4e48171432528e189b7663540c5b7b22fc
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.