Diffusers documentation
Pipeline blocks
Pipeline blocks
ModularPipelineBlocks
Base class for all Pipeline Blocks: PipelineBlock, AutoPipelineBlocks, SequentialPipelineBlocks, LoopSequentialPipelineBlocks
ModularPipelineBlocks provides method to load and save the defination of pipeline blocks.
This is an experimental feature and is likely to change in the future.
combine_inputs
< source >( *named_input_lists: typing.List[typing.Tuple[str, typing.List[diffusers.modular_pipelines.modular_pipeline_utils.InputParam]]] ) → List[InputParam]
Combines multiple lists of InputParam objects from different blocks. For duplicate inputs, updates only if current default value is None and new default value is not None. Warns if multiple non-None default values exist for the same input.
combine_outputs
< source >( *named_output_lists: typing.List[typing.Tuple[str, typing.List[diffusers.modular_pipelines.modular_pipeline_utils.OutputParam]]] ) → List[OutputParam]
Combines multiple lists of OutputParam objects from different blocks. For duplicate outputs, keeps the first occurrence of each output name.
Get all inputs and intermediates in one dictionary
init_pipeline
< source >( pretrained_model_name_or_path: typing.Union[str, os.PathLike, NoneType] = None components_manager: typing.Optional[diffusers.modular_pipelines.components_manager.ComponentsManager] = None collection: typing.Optional[str] = None )
create a ModularPipeline, optionally accept modular_repo to load from hub.
SequentialPipelineBlocks
class diffusers.modular_pipelines.SequentialPipelineBlocks
< source >( )
A Pipeline Blocks that combines multiple pipeline block classes into one. When called, it will call each block in sequence.
This class inherits from ModularPipelineBlocks. Check the superclass documentation for the generic methods the library implements for all the pipeline blocks (such as loading or saving etc.)
This is an experimental feature and is likely to change in the future.
from_blocks_dict
< source >( blocks_dict: typing.Dict[str, typing.Any] )
Creates a SequentialPipelineBlocks instance from a dictionary of blocks.
LoopSequentialPipelineBlocks
class diffusers.modular_pipelines.LoopSequentialPipelineBlocks
< source >( )
A Pipeline blocks that combines multiple pipeline block classes into a For Loop. When called, it will call each block in sequence.
This class inherits from ModularPipelineBlocks. Check the superclass documentation for the generic methods the library implements for all the pipeline blocks (such as loading or saving etc.)
This is an experimental feature and is likely to change in the future.
from_blocks_dict
< source >( blocks_dict: typing.Dict[str, typing.Any] )
Creates a LoopSequentialPipelineBlocks instance from a dictionary of blocks.
AutoPipelineBlocks
class diffusers.modular_pipelines.AutoPipelineBlocks
< source >( )
A Pipeline Blocks that automatically selects a block to run based on the inputs.
This class inherits from ModularPipelineBlocks. Check the superclass documentation for the generic methods the library implements for all the pipeline blocks (such as loading or saving etc.)
This is an experimental feature and is likely to change in the future.