rom the memory, and free up som GPU VRAM:   Copied import gc 

def flush():
    gc.collect()
    torch.cuda.empty_cache()

del text_encoder
del pipe
flush() Then compute the latents with the prompt embeddings as inputs:   Copied pipe = PixArtAlphaPipeline.from_pretrained(
    "PixArt-alpha/PixArt-XL-2-1024-MS",
    text_encoder=None,
    torch_dtype=torch.float16,
).to("cuda")

latents = pipe(
    negative_prompt=None, 
    prompt_embeds=prompt