Skip to content

Renamed variables from single letter to better naming - #449

Merged
patil-suraj merged 4 commits into
huggingface:mainfrom
daspartho:rename-var
Sep 9, 2022
Merged

patil-suraj merged 4 commits into
huggingface:mainfrom
daspartho:rename-var

Conversation

@daspartho

@daspartho daspartho commented Sep 9, 2022 •

Copy link
Copy Markdown
Contributor

Based on issue #198
Renamed single-letter variables to more explicit variables.

  • q -> query
  • k -> key
  • v -> value
  • b -> batch
  • c -> channel
  • h -> height
  • w -> weight
  • x -> hidden_states
  • x_in -> residual

@patil-suraj could you check it?
Thanks :)

q -> query
k -> key
v -> value
b -> batch
c -> channel
h -> height
w -> weight
@daspartho
daspartho marked this pull request as draft September 9, 2022 15:55
@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Sep 9, 2022 •

Copy link
Copy Markdown

The documentation is not available anymore as the PR was closed or merged.

missed some in the initial commit
@daspartho
daspartho marked this pull request as ready for review September 9, 2022 16:00

@patil-suraj patil-suraj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot, just a couple more changes!

Comment thread src/diffusers/models/attention.py Outdated
Comment thread src/diffusers/models/attention.py Outdated
As per  code review suggestions, renamed x -> hidden_states and x_in -> residual
@daspartho

Copy link
Copy Markdown
Contributor Author

@patil-suraj renamed variable names as per suggestion :)

Comment thread src/diffusers/models/attention.py Outdated

@patil-suraj patil-suraj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Merging now

@patil-suraj
patil-suraj merged commit 5843487 into huggingface:main Sep 9, 2022
@daspartho
daspartho deleted the rename-var branch September 9, 2022 16:49
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* renamed variable names

q -> query
k -> key
v -> value
b -> batch
c -> channel
h -> height
w -> weight

* rename variable names

missed some in the initial commit

* renamed more variable names

As per  code review suggestions, renamed x -> hidden_states and x_in -> residual

* fixed minor typo
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.

3 participants