any idea why i'm getting an out of cuda

any idea why i'm getting an out of cuda memory error when i try to load my dreambooth checkpoint like this
vae = AutoencoderKL.from_single_file(vae_fp16_path, torch_dtype=torch.float16)
pipe = StableDiffusionXLPipeline.from_single_file(
        pretrained_model_link_or_path=path_to_weights,
        vae=vae,
        torch_dtype=torch.float16,
        variant="fp16",
        use_safetensors=True,
    )
pipe.to("cuda")
Was this page helpful?