Buckets:

hf-doc-build/doc / diffusers /main /tr /modular_diffusers /coming_from_diffusion_pipeline.md
mishig's picture
|
download
raw
3.56 kB

DiffusionPipeline'den gelen

DiffusionPipeline ile aşinalıysanız ve ModularPipeline ile ilk kez çalışıyorsanız, bazı şeyler farklı işler. hızlı başlangıç bölümünden geçmeden önce bunları aklınızda bulundurmanız için burada listelenmiştir.

  • Yükleme tembel ve esnektir. from_pretrained(), herhangi bir ağırlık yüklemeksizin hattı repozituarın modular_model_index.json dosyasından oluşturur. Ardından load_components() bileşenleri yükler ve hepsini tek seferde yüklemek zorunda değildir: varsayılan olarak her şeyi yükler, ancak yalnızca names ile adını belirttiğiniz bileşenleri veya workflow ile bir iş akışının gerektirdiği bileşen setini yükleyebilirsiniz. update_components(), zaten sahip olduğunuz bir bileşeni yeniden kullanmanıza veya repozituarın spesifikasyonundan farklı bir bileşeni kullanmanıza olanak tanır. Bileşenleri yükleme ve Bileşenleri güncelleme bölümlerine bakın.
  • 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 and the AutoPipeline classes don't work with a repository that only has a modular_model_index.json.
  • A call returns the pipeline state, which holds the intermediate values too (prompt_embeds, latents, ...). Ask for what you need with the output argument, output="images" or output=["images", "latents"], or read an attribute of the state, as in the quickstart. See 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.
  • There is no callback_on_step_end; however, you can insert a block into the denoising loop to use your existing callback functions. See Modular pipelines in the callbacks guide.
  • Pipeline, bloklardan oluşan bir grafiktir ve init_pipeline() ile oluşturulmadan önce bunları değiştirebilirsiniz (çıkar, ekle, değiştir); pipe.blocks bir kopya döndürür, bu nedenle blokları önce düzenleyin. Yeni iş akışları oluşturma bölümüne bakın.
  • Offloading is handled by a ComponentsManager, which can serve several pipelines that share components. See the ComponentsManager guide.

Xet Storage Details

Size:
3.56 kB
·
Xet hash:
c3197dcadbea60fff459d07f1bbd576529bf9b76c11b46ab071a77f5b03b0dbb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.