mindformers.pipeline.MultiModalToTextPipeline

View Source On Gitee
class mindformers.pipeline.MultiModalToTextPipeline(model, processor=None, **kwargs)[source]

Pipeline for multi-modal to text generation.

Parameters
  • model (Union[PretrainedModel, Model]) – The model used to perform task, the input should be a model instance inherited from PretrainedModel.

  • processor (BaseXModalToTextProcessor, optional) – The image_processor of model, it could be None if the model do not need image_processor. Default: None.

Returns

A pipeline for MultiModalToTextPipeline.

Raises
  • TypeError – If input model and image_processor's types are not corrected.

  • ValueError – If the input model is not in support list.