Buckets:
DiffusionPipeline から
DiffusionPipeline に慣れている方で、ModularPipeline を初めて扱う場合は、いくつか動作が異なります。クイックスタート を進める前に、以下の点をご確認ください。
- 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は別のインデックスである
modular_model_index.json**を読み取りますが、モデルにモジュラーパイプラインが存在する限り、model_index.jsonのみを含むリポジトリでも動作します。逆は成り立ちません。DiffusionPipelineおよびAutoPipelineクラスは、modular_model_index.jsonのみを含むリポジトリでは動作しません。 - 呼び出しはパイプラインの状態を返します。この状態には中間値(
prompt_embeds、latentsなど)も保持されています。output引数で必要なものを指定します。output="images"やoutput=["images", "latents"]のように指定するか、クイックスタート にあるように状態の属性を読み取ります。States を参照してください。 - Classifier-free guidance is supported in the
guidercomponent, not aguidance_scalecall argument:pipe.update_components(guider=ClassifierFreeGuidance(guidance_scale=5.0)). See the guiders guide. callback_on_step_endは存在しません。ただし、デノイジングループにブロックを挿入して、既存のコールバック関数を使用できます。コールバックガイドの「Modular pipelines」を参照してください。- パイプラインはブロックのグラフであり、init_pipeline()でビルドする前に変更(pop、insert、replace)できます。
pipe.blocksはコピーを返すため、まずブロックを編集してください。新しいワークフローの作成を参照してください。 - オフロードは、コンポーネントを共有する複数のパイプラインに対応できる**ComponentsManager**によって処理されます。ComponentsManager ガイドを参照してください。
Xet Storage Details
- Size:
- 3.79 kB
- Xet hash:
- 11ea1055eb3671bf53ed6865298d49bb39e711d2ac49d04e4a9b04b056a921bb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.