Skip to main content
Version: 0.7.x

Interface: TextToImageProps

Defined in: packages/react-native-executorch/src/types/tti.ts:9

Configuration properties for the useTextToImage hook.

Properties

inferenceCallback()?

optional inferenceCallback: (stepIdx) => void

Defined in: packages/react-native-executorch/src/types/tti.ts:31

Optional callback function that is triggered after each diffusion inference step. Useful for updating a progress bar during image generation.

Parameters

stepIdx

number

The index of the current inference step.

Returns

void


model

model: object

Defined in: packages/react-native-executorch/src/types/tti.ts:13

Object containing the required model sources for the diffusion pipeline.

decoderSource

decoderSource: ResourceSource

Source for the VAE decoder model binary, used to decode the final image.

encoderSource

encoderSource: ResourceSource

Source for the text encoder model binary.

schedulerSource

schedulerSource: ResourceSource

Source for the diffusion scheduler binary/config.

tokenizerSource

tokenizerSource: ResourceSource

Source for the text tokenizer binary/config.

unetSource

unetSource: ResourceSource

Source for the UNet (noise predictor) model binary.


preventLoad?

optional preventLoad: boolean

Defined in: packages/react-native-executorch/src/types/tti.ts:37

Boolean that can prevent automatic model loading (and downloading the data if loaded for the first time) after running the hook. Defaults to false.