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

Lint and fix undefined names (1/N) #6028

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Lint and fix undefined names (1/N) #6028

merged 1 commit into from
Dec 12, 2024

Conversation

huchenlei
Copy link
Collaborator

@huchenlei huchenlei commented Dec 12, 2024

This PR is the first PR that fixes most obvious undefined names errors.

@@ -228,9 +228,9 @@ def __init__(
linear_in = GLU(dim, inner_dim, activation, dtype=dtype, device=device, operations=operations)
else:
linear_in = nn.Sequential(
Rearrange('b n d -> b d n') if use_conv else nn.Identity(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rearrange is not defined in dit.py, I believe it's a misspelling of rearrange from einops.

@@ -52,7 +54,7 @@ def __init__(

if self.use_ema:
self.model_ema = LitEma(self, decay=ema_decay)
logpy.info(f"Keeping EMAs of {len(list(self.model_ema.buffers()))}.")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing logpy with python's built-in logging module. logpy is not used in this project.

@@ -112,7 +114,7 @@ def __init__(

self.encoder: torch.nn.Module = instantiate_from_config(encoder_config)
self.decoder: torch.nn.Module = instantiate_from_config(decoder_config)
self.regularization: AbstractRegularizer = instantiate_from_config(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AbstractRegularizer is not defined in the code. Since it's a type annotation, removing it does not alter any runtime behaviors.

@comfyanonymous comfyanonymous merged commit 2cddbf0 into master Dec 12, 2024
6 checks passed
@comfyanonymous comfyanonymous deleted the undefined1 branch December 12, 2024 23:55
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