We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you attempt to resume training from a checkpoint, you might encounter the following error:
KeyError: "param 'initial_lr' is not specified in param_groups[0] when resuming an optimizer"
it can be fixed by adjusting the initialization of param_groups in the train_diffusion_unet_image_workspace.py file (line ~ 70) to this:
param_groups
train_diffusion_unet_image_workspace.py
param_groups = [ {'params': self.model.model.parameters(), 'lr': cfg.optimizer.lr, 'initial_lr': cfg.optimizer.lr}, {'params': obs_encorder_params, 'lr': obs_encorder_lr, 'initial_lr': obs_encorder_lr} ]
The text was updated successfully, but these errors were encountered:
Hey @omarrayyann change this in the file train_diffusion_unet_image_workspace.py
lr_scheduler = get_scheduler( cfg.training.lr_scheduler, optimizer=self.optimizer, num_warmup_steps=cfg.training.lr_warmup_steps, num_training_steps=( len(train_dataloader) * cfg.training.num_epochs ) // cfg.training.gradient_accumulate_every, # pytorch assumes stepping LRScheduler every epoch # however huggingface diffusers steps it every batch last_epoch=self.global_step - 1 )
to
lr_scheduler = get_scheduler( cfg.training.lr_scheduler, optimizer=self.optimizer, num_warmup_steps=cfg.training.lr_warmup_steps, num_training_steps=( len(train_dataloader) * cfg.training.num_epochs ) // cfg.training.gradient_accumulate_every, # pytorch assumes stepping LRScheduler every epoch # however huggingface diffusers steps it every batch last_epoch=-1 )
Sorry, something went wrong.
No branches or pull requests
If you attempt to resume training from a checkpoint, you might encounter the following error:
it can be fixed by adjusting the initialization of
param_groups
in thetrain_diffusion_unet_image_workspace.py
file (line ~ 70) to this:The text was updated successfully, but these errors were encountered: