Skip to content

Overview

These are the classes that handle containing media and other metadata.

Media Containers

Base64

uaiDiffusers.media.mediaRequestBase
MediaRequestBase64

Class to hold the media as a base64 string along with the prompt used to generate it

__init__(media, prompt)

Parameters:

Name Type Description Default
media str

The base64 string of the media

required
prompt str

The prompt used to generate the media

required
MultipleMediaRequest

Class used to hold multiple MediaRequestBase64 objects and return them if needed

__init__(media=[])

Parameters:

Name Type Description Default
media list

A list of MediaRequestBase64 objects

[]
addMedia(media)

Add a MediaRequestBase64 object to the list of media

Parameters:

Name Type Description Default
media MediaRequestBase64

The media to add

required
toJson()

Convert the object to a json string

Returns:

Name Type Description
str

The json string