Skip to content

LTXPipeline should tolerate torch.Generator on CPU by generating the latents on the device where the Generator is - #10543

Closed
bghira wants to merge 1 commit into
huggingface:mainfrom
bghira:bugfix/ltx-cpu-generator
Closed

LTXPipeline should tolerate torch.Generator on CPU by generating the latents on the device where the Generator is#10543
bghira wants to merge 1 commit into
huggingface:mainfrom
bghira:bugfix/ltx-cpu-generator

Conversation

@bghira

@bghira bghira commented Jan 12, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

When using LTXVideo using a torch.Generator(device="cpu") we encounter error where the noise is generating on device using generator but we should generate the noise on generator.device and move to device after, which resolves the condition.

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@sayakpaul @yiyixuxu

…latents on the device where the Generator is
@bghira

bghira commented Jan 12, 2025

Copy link
Copy Markdown
Contributor Author

oh 🤔 i'm confused, hmm.. my version had torch.randn. is this already resolved through randn_tensor?

@sayakpaul

Copy link
Copy Markdown
Member

Cc: @lmxyy @a-r-r-o-w

@bghira bghira closed this Jan 13, 2025
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

Successfully merging this pull request may close these issues.

2 participants