Diffusers documentation

DiffusionPipeline'den gelen

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.42.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

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ı repodaki 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 ihtiyaç duyduğu bileşen setini yükleyebilirsiniz. update_components(), zaten sahip olduğunuz bir bileşeni yeniden kullanmanıza veya repodaki spesifikasyondan 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.
Update on GitHub