Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to release tpu memory after del diffusers pipeline #8516

Open
ghost opened this issue Dec 22, 2024 · 1 comment
Open

how to release tpu memory after del diffusers pipeline #8516

ghost opened this issue Dec 22, 2024 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 22, 2024

❓ Questions and Help

i create a pipeline
`
pipeline = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.bfloat16).to(torch_xla.core.xla_model.xla_device())

pipeline.to('cpu')

pipeline = StableAudioPipeline.from_pretrained("stabilityai/stable-audio-open-1.0", torch_dtype=torch.bfloat16).to(torch_xla.core.xla_model.xla_device()) #which cause tpu memory problem
`
i want to ask how to release tpu memory. is there any tpu version of torch.cuda.empty_cache()?

@radna0
Copy link

radna0 commented Dec 25, 2024

See #8520 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant