Skip to content

log_snr_to_alpha_bar raises NameError due to undefined cos_log_snr #10

Description

@TryingManV2

Description:

In the current implementation, the function log_snr_to_alpha_bar in diffusion.py attempts to call cos_log_snr(t), but this function does not exist in the codebase.

Current code:

def log_snr_to_alpha_bar(t):
    return sigmoid(cos_log_snr(t))  

Error produced:

NameError: name 'cos_log_snr' is not defined

Root Cause:

The function is actually defined as cosine_log_snr. There is no cos_log_snr.

Proposed Fix:

The call should be updated to match the exact function name:

def log_snr_to_alpha_bar(t):
    return sigmoid(cosine_log_snr(t)) 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions