Wiki
FlickrLeetcode
  • πŸ’žArtificial Intelligence
    • βš™οΈMidjourney vs Stable Diffusion
    • βš™οΈCreative QR Codes with ControlNet
      • βš™οΈHow to generate a QR Code
      • βš™οΈCollect prompt
      • βš™οΈclip skip
      • βš™οΈAUTOMATIC1111
      • βš™οΈEdge detection and human pose detection
    • βš™οΈStable Diffusion
    • βš™οΈWhat is 'token' and 'turbo'?
    • βš™οΈToday's learning--LangChain
      • βš™οΈPrompt
    • βš™οΈLLM Parameters Demystified
    • βš™οΈWhat is Cohere playground?
    • βš™οΈDALL-E
    • βš™οΈHow to use AI to learn something that you don't know?
    • βš™οΈDiffusers
    • Boosting Algorithms in machine learning, part 1:AdaBoost
  • πŸ’žGitHub
    • βœ…How to add a issue of the code with GitHub?
    • βœ…How to edit code?
    • βœ…How to use GitHub Desktop
    • βœ…How to review in GutHub?
  • πŸ’žLastest concepts for me
    • πŸͺ…Pandas DataFrame
    • πŸͺ…Choosing between loc and iloc
  • πŸ’žNeed to remember
    • πŸ”’An article for leetcode
    • πŸ‰‘two types of group work
    • πŸ’What is hashtag#?
    • 🐝Week6_APD
    • πŸ¦‹API
    • 🎼BFF
  • πŸ’žPython
    • 🐍argument & parameter
    • 🐍"{:.2f}"
    • 🐍Timeit in Python
    • 🐍Today's learning--Pylint
    • 🐍Split and Strip in Python
    • 🐍Getter and Setter in Python
    • 🐍"import json" in Python
    • 🐍Open CSV file in Python
    • 🐍print(f"An error occurred: {e}")
  • Page
  • πŸͺ…command-line
  • πŸ’žDataVisualization
    • πŸͺ…How to choose plot type
  • πŸ’žDataCleaning
    • πŸͺ…Some basic code of data_cleaning
  • πŸ’žJava
    • 🍑difference use between ArrayList and HashMap in Java
    • 🍑ArrayList & LinkedList
    • 🍑assertFalse(App.checkInputNumber(1,0))
      • 🍑HashSet
    • 🍑iterator
    • 🍑Java concept of assignment 1
    • 🍑Week6_Java
    • 🍑serializable
  • πŸ’žMark something that easily to forget
    • πŸ™‰Mark something
    • πŸ™‰How to edit cover picture from "Flickr" using "URL" in GitBook?
  • πŸ’žVS Code
    • βœ–οΈInstall a project in VS Code
    • βœ–οΈWhat should do after editing the code of one branch?
    • βœ–οΈHow to create a branch in VS code?
    • βœ–οΈHow to debug?
Powered by GitBook
On this page
  • What is "pipeline"
  • Load community pipelines
  • Credit

Was this helpful?

Edit on GitHub
  1. Artificial Intelligence

Diffusers

PreviousHow to use AI to learn something that you don't know?NextBoosting Algorithms in machine learning, part 1:AdaBoost

Last updated 1 year ago

Was this helpful?

Diffusers is the go-to library for state-of-the-art pretrained diffusion models for generating images, audio, and even 3D structures of molecules. Whether you're looking for a simple inference solution or want to train your own diffusion model, Diffusers is a modular toolbox that supports both. The library of Hugging Face community is designed with a focus on usability over performance, simple over easy, and customizability over abstractios.

The library has three main components:

  • State-of-the-art diffusion pipelines for inference with just a few lines of code.

  • Interchangeable noise schedulers for balancing trade-offs between generation speed and quality.

  • Pretrained models that can be used as building blocks, and combined with schedulers, for creating your own end-to-end diffusion systems.

What is "pipeline"

A pipeline is a set of processing steps that covert an input to an output. In IT, pipelines are commonly used in the context of machine learning and natural language processing. Here are some key points about pipelines:

  • Types of Pipelines: There are several types of pipelines, including diffusion pipelines, data pipelines, and deployment pipelines. Diffusion pipelines are used for running state-of-the-art diffusion models in inference, while data pipelines are used for processing and transforming data. Deployment pipelines are used for deploying software applications to production environments.

  • Benefits: Pipelines can help automate and streamline complex processes, making them more efficient and less error-prone. They can also help ensure consistency and reproducibility in machine learning and natural language processing workflows.

  • Popular Tools: Some popular tools for building and managing pipelines include Hugging Face, pipeline.ai, and GitHub. These tools offer a variety of features and integrations to suit different needs and preferences.

Overall, pipelines are an important tool for automating and streaming complex processes in IT, particularly in the context of machine learning and natural language processing. When choosing a pipeline, it is important to consider factors such as the type of pipeline, the benefits, and available tools and integrations.

Load community pipelines

Community pipelines are any class that are different from the original implementation as specified in their paper (for example, the corresponds to the paper). They provide additional functionality or extend the original implementation of a pipeline.

There are many cool community pipelines like or , and you can find all the official community pipelines .

To load any community pipeline on the Hub, pass the repository id of the community pipeline to the custom pipeline argument and the model repository where you’d like to load the pipeline weights and components from.

from diffusers import DiffusionPipeline

repo_id = "runwayml/stable-diffusion-v1-5"
pipeline = DiffusionPipeline.from_pretrained(repo_id)
print(pipeline)

Credit

As a class method, is responsible for two things:

Download the latest version of the folder structure required for inference and cache it. If the latest folder structure is available in the local cache, reuses the cache and won’t redownload the files.

Load the cached weights into the correct pipeline - retrieved from the model_index.json file - and return an instance of it.

The pipelines underlying folder structure corresponds directly with their class instances. For example, the corresponds to the folder structure in .

πŸ’ž
βš™οΈ
DiffusionPipeline
StableDiffusionControlNetPipeline
Text-to-Image Generation with ControlNet Conditioning
Speech to Image
Composable Stable Diffusion
here
DiffusionPipeline.from_pretrained()
DiffusionPipeline.from_pretrained()
class
StableDiffusionPipeline
runwayml/stable-diffusion-v1-5
Overviewhuggingface
Logo
Mystic AI - Blog - Tutorial How to deploy a Stable Diffusion pipelinemystic.ai
Logo