 to CPU and then are moved to a
torch.device('meta') and loaded to GPU only when their specific submodule has its forwardmethod called. Note that offloading happens on a submodule basis. Memory savings are higher than withenable_model_cpu_offload`, but performance is lower.

generate_caption

<
source
>
(
images

)



Generates caption for a given image.

invert

<
source
>
(
prompt: typing.Optional[str] = None
image: typing.Union[torch.FloatTe