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

hotfix: add lightning dependancy for _cosine_scheduler_fn(..) #25

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

secutron
Copy link
Contributor

@secutron secutron commented May 9, 2024

Thank you for sharing this wonderful works!

I found a simple lightning dependancy and epoch parameter in the _cosine_scheduler_fn(...) in Marlin>model>marlin.py cause me an error.

Somehow the epoch parameter above called to a number of max_epochs not max_epochs-1. (This is not a lightning's bug or something)

So I added a simple script to _cosine_scheduler_fn(..) like belows:

def _cosine_scheduler_fn(self, epoch):
    if epoch > 0: epoch -= 1 # lightning dependancy
    return self.lr_scheduler_factors[epoch]

Again, many thanks for your great achievement to the deep learning commnuniities!

@secutron secutron changed the title hotfix: add lighting dependancy for _cosine_scheduler_fn(..) hotfix: add lightning dependancy for _cosine_scheduler_fn(..) May 9, 2024
@ControlNet ControlNet merged commit 398060f into ControlNet:master Mar 27, 2025
36 checks passed
@ControlNet
Copy link
Owner

The tiny offset 1 should be not significant to affect the training, but appreciate for your contribution! Let's merge it.

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

Successfully merging this pull request may close these issues.

2 participants