Skip to content

Why no 'unet.train()' after log_validation in train_text_to_image.py #7493

Answered by tolgacangoz
wikiwen asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @wikiwen,
I guess log_validation() creates a new and independent pipeline by using accelerator.unwrap_model() and then removes it at the end. So, as I understand, it doesn't intervene previous stack's unet; in other words, there is no need to do unet.train() after log_validation() because there was no unet.eval() in the first place.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wikiwen
Comment options

Answer selected by wikiwen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants