[Graph] Add to_cuda() for Module class#57
Merged
hjjq merged 2 commits intohidet-org:mainfrom Jan 4, 2023
hjjq:module_cuda
Merged
[Graph] Add to_cuda() for Module class#57hjjq merged 2 commits intohidet-org:mainfrom hjjq:module_cuda
hjjq merged 2 commits intohidet-org:mainfrom
hjjq:module_cuda
Conversation
added 2 commits
January 4, 2023 17:14
yaoyaoding
pushed a commit
that referenced
this pull request
Apr 3, 2024
Add bias to Conv2d Module. Defaults to false for back compatibility, **this is different from torch default**. Towards #57
yaoyaoding
pushed a commit
that referenced
this pull request
Apr 3, 2024
Add some necessary module components used frequently in Stable Diffusion's UNet. Includes fixes to module attribute access from LLM branch and work arounds for torch weight copying. Towards #57.
yaoyaoding
pushed a commit
that referenced
this pull request
Apr 3, 2024
Add graph module for using flash attention and clarify some differences in flash attention vs torch sdpa. **Attention: (pun intended)** Softmax has temperature scaling option. Divides inputs by scalar, good explanation of numerical effects [here](https://medium.com/@harshit158/softmax-temperature-5492e4007f71). Used when softmax inputs QK are too big for float 16 (abs value > 65504). This usually means the numbers are so large that dividing by small (< 4) scalar has little effect. Stable diffusion does not use this, as torch spda supports float 32 (or somehow avoids NaNs from large values). No visual or significant numeric differences in this output layer noticed. Towards #57.
KTong821
added a commit
to KTong821/hidet
that referenced
this pull request
Apr 24, 2024
Define complete UNet, with forward pass broken into down, mid, and up sections. Useful diagrams [here](http://jalammar.github.io/illustrated-stable-diffusion/) Uses blocks defined in hidet-org#97. Heavily reduced version from diffusers containing only necessary features for stable diffusion v2-1. Towards hidet-org#57. --------- Co-authored-by: vadiklyutiy <156319763+vadiklyutiy@users.noreply.github.com>
KTong821
added a commit
to KTong821/hidet
that referenced
this pull request
Apr 24, 2024
Stable diffusion uses fundamentally the same positional embeddings, but since timesteps change, a cache is not possible. There's also small changes in tensor layouts and calculation parameters between the diffusers version and the one from Llama, so I've recreated it here for now. An abstract version that combines both version is TODO. Towards hidet-org#57.
KTong821
added a commit
to KTong821/hidet
that referenced
this pull request
Apr 24, 2024
Add UNet Down, Up, and Mid block definitions and attention transformer utility layer. Modules are designed so that kwargs passed to constructors are all the same config from huggingface with minimal changes - lots of shared values and too many parameters to list individually. Same kwargs are passed to nested objects. Open to other suggestions, although this is a single use case problem. Towards hidet-org#57.
KTong821
added a commit
to KTong821/hidet
that referenced
this pull request
Apr 24, 2024
Infrastructure for compiled stable diffusion app. Towards hidet-org#57
vadiklyutiy
added a commit
that referenced
this pull request
Jul 22, 2024
Define complete UNet, with forward pass broken into down, mid, and up sections. Useful diagrams [here](http://jalammar.github.io/illustrated-stable-diffusion/) Uses blocks defined in #97. Heavily reduced version from diffusers containing only necessary features for stable diffusion v2-1. Towards #57. --------- Co-authored-by: vadiklyutiy <156319763+vadiklyutiy@users.noreply.github.com>
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 22, 2024
Stable diffusion uses fundamentally the same positional embeddings, but since timesteps change, a cache is not possible. There's also small changes in tensor layouts and calculation parameters between the diffusers version and the one from Llama, so I've recreated it here for now. An abstract version that combines both version is TODO. Towards #57.
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 22, 2024
Add UNet Down, Up, and Mid block definitions and attention transformer utility layer. Modules are designed so that kwargs passed to constructors are all the same config from huggingface with minimal changes - lots of shared values and too many parameters to list individually. Same kwargs are passed to nested objects. Open to other suggestions, although this is a single use case problem. Towards #57.
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 22, 2024
Infrastructure for compiled stable diffusion app. Towards #57
vadiklyutiy
added a commit
that referenced
this pull request
Jul 23, 2024
Define complete UNet, with forward pass broken into down, mid, and up sections. Useful diagrams [here](http://jalammar.github.io/illustrated-stable-diffusion/) Uses blocks defined in #97. Heavily reduced version from diffusers containing only necessary features for stable diffusion v2-1. Towards #57. --------- Co-authored-by: vadiklyutiy <156319763+vadiklyutiy@users.noreply.github.com>
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 23, 2024
Stable diffusion uses fundamentally the same positional embeddings, but since timesteps change, a cache is not possible. There's also small changes in tensor layouts and calculation parameters between the diffusers version and the one from Llama, so I've recreated it here for now. An abstract version that combines both version is TODO. Towards #57.
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 23, 2024
Add UNet Down, Up, and Mid block definitions and attention transformer utility layer. Modules are designed so that kwargs passed to constructors are all the same config from huggingface with minimal changes - lots of shared values and too many parameters to list individually. Same kwargs are passed to nested objects. Open to other suggestions, although this is a single use case problem. Towards #57.
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 23, 2024
Infrastructure for compiled stable diffusion app. Towards #57
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.
No description provided.