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

Some small bugs when training videocrafter2 #13

Open
Vincent-luo opened this issue Dec 5, 2024 · 0 comments
Open

Some small bugs when training videocrafter2 #13

Vincent-luo opened this issue Dec 5, 2024 · 0 comments

Comments

@Vincent-luo
Copy link

Thansks for this great project!

After doing some training with videocrafter2, I found some bugs.

  1. can't train text encoder even if set cond_stage_trainable: true in config. Refer to these lines, text encoding process(get_learned_conditioning) is under torch.no_grad(), so no grad is computed. Simple fix is just remove the @torch.no_grad()
    @torch.no_grad()
    def get_batch_input(self, batch, random_uncond, return_first_stage_outputs=False, return_original_cond=False, is_imgbatch=False):
        ...

        if isinstance(cond, dict) or isinstance(cond, list):
            cond_emb = self.get_learned_conditioning(cond)
        else:
            cond_emb = self.get_learned_conditioning(cond.to(self.device))
        ...
  1. in some shell scripts there is line like --auto_resume True(like this line), actually we don't need "True" here. auto_resume is a flag with no arguement, if it exist it's true, otherwise it's false.

  2. same logging message printed twice, seems like the mainlogger inherits the root logger's handler. Simple fix is set " logger.propagate = False" in set_logger.

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