Spaces:
Runtime error
Runtime error
Download lib/smplfusion/patches/transformerpatch/default.py from terrapretapermaculture/HD-Painter: direct link, hf CLI and curl.
- Browser
- Download file 294 Bytes
-
https://huggingface.co/spaces/terrapretapermaculture/HD-Painter/resolve/main/lib/smplfusion/patches/transformerpatch/default.py
- Command line
-
hf download hf://spaces/terrapretapermaculture/HD-Painter/lib/smplfusion/patches/transformerpatch/default.py
-
curl -L -o default.py https://huggingface.co/spaces/terrapretapermaculture/HD-Painter/resolve/main/lib/smplfusion/patches/transformerpatch/default.py
294 Bytes
| import torch | |
| from ... import share | |
| def forward(self, x, context=None): | |
| x = x + self.attn1(self.norm1(x), context=context if self.disable_self_attn else None) # Self Attn. | |
| x = x + self.attn2(self.norm2(x), context=context) # Cross Attn. | |
| x = x + self.ff(self.norm3(x)) | |
| return x | |