Skip to content

Commit

Permalink
fix opencv and realesrgan dependencies in mac install
Browse files Browse the repository at this point in the history
  • Loading branch information
lstein committed Sep 12, 2022
1 parent 25d9ccc commit 9fa1f31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions environment-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ dependencies:
- omegaconf==2.1.1
- onnx==1.12.0
- onnxruntime==1.12.1
- opencv-python==4.5.5.64
- pudb==2022.1
- pytorch-lightning==1.6.5
- realesrgan==0.2.5.0
- scipy==1.9.1
- streamlit==1.12.2
- sympy==1.10.1
- tensorboard==2.9.0
- torchmetrics==0.9.3
- pip:
- opencv-python==4.6.0
- realesrgan==0.2.5.0
- test-tube==0.7.5
- transformers==4.21.2
- torch-fidelity==0.3.0
Expand Down
6 changes: 3 additions & 3 deletions ldm/modules/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ def forward(self, x, context=None):

def _forward(self, x, context=None):
x = x.contiguous() if x.device.type == 'mps' else x
x += self.attn1(self.norm1(x))
x += self.attn2(self.norm2(x), context=context)
x += self.ff(self.norm3(x))
x = self.attn1(self.norm1(x)) + x
x = self.attn2(self.norm2(x), context=context) + x
x = self.ff(self.norm3(x)) + x
return x


Expand Down

0 comments on commit 9fa1f31

Please sign in to comment.