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

What is Time schedule difference? between torch.sigmoid(torch.randn((bs,)) and timesteps[random.randint(0, 999) #133

Open
xilanhua12138 opened this issue Nov 11, 2024 · 1 comment

Comments

@xilanhua12138
Copy link

In the file 3139864#diff-dcf224c4e9bbbf1401dce3c8338c64162c858fb21a9e8625e828637896adfcddR255
image

Why do you change:
t = torch.sigmoid(torch.randn((bs,), device=accelerator.device))
to:
t = torch.tensor([timesteps[random.randint(0, 999)]]).to(accelerator.device)

I found that in the first version, the training time is always near 0.5, and in the second version t has much wider span

@xilanhua12138
Copy link
Author

xilanhua12138 commented Nov 11, 2024

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