Is this right Sample a random timestep for each image
in the train script examples/controlnet/train_controlnet.py
?
#10571
Unanswered
Chinese-Coding
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is this right
Sample a random timestep for each image
in the train scriptexamples/controlnet/train_controlnet.py
?I am studying the code of
![image](https://private-user-images.githubusercontent.com/137599793/402862964-ed9b2cd5-7a79-43e9-b413-68858cc1c1dd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDM4OTUsIm5iZiI6MTczOTU0MzU5NSwicGF0aCI6Ii8xMzc1OTk3OTMvNDAyODYyOTY0LWVkOWIyY2Q1LTdhNzktNDNlOS1iNDEzLTY4ODU4Y2MxYzFkZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQxNDMzMTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zMDkyZDE1Njc1MGE4YjBiNGU0ZmIwMTBiMjQ4NzM2ODNlMzEzMDhmMzYwZmU3OWVmNWQ5MWQ3ZmJiODEyZWIzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.FpkiV0q1pfOl-i9v_jYVKcF6LUPQHFw8Gs5eJb3A5og)
train_controlnet.py
and I found that the script only samples noise once for each image during training.According to the definition of diffusion, shouldn't it sample 1000 times or
noise_scheduler.config.num_train_timesteps
times for each image?I hope someone can answer this question, I will be very grateful.
The code is here:
https://github.com/huggingface/diffusers/blob/fbff43acc9f52aec18e27806cc258a592f8b53f6/examples/controlnet/train_controlnet.py#L1040C1-L1046C1
Beta Was this translation helpful? Give feedback.
All reactions