-
Notifications
You must be signed in to change notification settings - Fork 6.4k
[Qwen LoRA training] fix bug when offloading #12440
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
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
accelerator.device, non_blocking=True, dtype=vae.dtype | ||
) | ||
latents_cache.append(vae.encode(batch["pixel_values"]).latent_dist) | ||
latents_cache.append(vae.encode(batch["pixel_values"]).latent_dist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so that vae
& batch["pixel_values"]
are both on the same device. w/o this change the vae
is back on cpu but batch["pixel_values"]
are on accelerator.device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay to merge after "smol" is updated to "small". :v
smol change to fix bug when
--cache_latents
&--offload
both enabled