Add node to extend sigmas#7901
Merged
comfyanonymous merged 4 commits intoComfy-Org:masterfrom May 2, 2025
Merged
Conversation
Contributor
|
Personally I don't agree on the naming, it's sort of out of place. I'd suggest renaming a bunch of things:
Also, I'd like to detach the interpolation space from the actual interpolation function, and introduce ...
interpolator = {
'linear': lambda x: x
'cosine': lambda x: torch.sin(x*math.pi/2)
'sine': lambda x: 1 - torch.cos(x*math.pi/2)
}[spacing]
# linear space for our interpolation function
x = torch.linspace(0, 1, steps + 1)[1:-1]
for i in range(len(sigmas) - 1):
...
if start_at_sigma <= sigma_current <= end_at_sigma:
interpolated_steps = interpolator(x) * (sigma_next - sigma_current) + sigma_current
extended_sigmas.extend(interpolated_steps.tolist())
... |
Co-authored-by: liesen <liesen.dev@gmail.com>
liesened
reviewed
May 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a node that will extend the sigma values for a given sigma range. This is exactly identical functionality to #7890 but now applicable to any sampler -- see that PR for more details.