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

Flux: Fix random validation errors due to some tensors being on the cpu #629

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

mhirki
Copy link
Contributor

@mhirki mhirki commented Aug 4, 2024

Flux had random validation errors similar to SD3 in issue #546. This pull request makes sure all tensors are moved to the GPU before calling the transformer. Code is mostly copied from helpers/sd3/pipeline.py. In the case of Flux, the transformer also takes in txt_ids and img_ids parameters which also needed to be moved to GPU.

I did some testing with extra debug prints and the validation image was successfully generated even when tensors were originally on the CPU.

@bghira bghira merged commit af4e253 into bghira:main Aug 4, 2024
1 check passed
@bghira
Copy link
Owner

bghira commented Aug 4, 2024

thanks!

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