Why no 'unet.train()' after log_validation in train_text_to_image.py #7493
-
|
In diffusers/examples/text_to_image/train_text_to_image.pyline As model will be "eval()" default in log_validation, why no |
Beta Was this translation helpful? Give feedback.
Answered by
tolgacangoz
Mar 27, 2024
Replies: 1 comment 1 reply
-
|
Hi @wikiwen, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
wikiwen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @wikiwen,
I guess
log_validation()creates a new and independentpipelineby usingaccelerator.unwrap_model()and then removes it at the end. So, as I understand, it doesn't intervene previous stack'sunet; in other words, there is no need to dounet.train()afterlog_validation()because there was nounet.eval()in the first place.