Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
de401d8f
Commit
de401d8f
authored
May 08, 2023
by
brkirch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix generation with k-diffusion/UniPC on x64 Macs
parent
9efb809f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
modules/mac_specific.py
modules/mac_specific.py
+5
-0
No files found.
modules/mac_specific.py
View file @
de401d8f
...
...
@@ -57,3 +57,8 @@ if has_mps:
# MPS workaround for https://github.com/pytorch/pytorch/issues/96113
CondFunc
(
'torch.nn.functional.layer_norm'
,
lambda
orig_func
,
x
,
normalized_shape
,
weight
,
bias
,
eps
,
**
kwargs
:
orig_func
(
x
.
float
(),
normalized_shape
,
weight
.
float
()
if
weight
is
not
None
else
None
,
bias
.
float
()
if
bias
is
not
None
else
bias
,
eps
)
.
to
(
x
.
dtype
),
lambda
_
,
input
,
*
args
,
**
kwargs
:
len
(
args
)
==
4
and
input
.
device
.
type
==
'mps'
)
# MPS workaround for https://github.com/pytorch/pytorch/issues/92311
if
platform
.
processor
()
==
'i386'
:
for
funcName
in
[
'torch.argmax'
,
'torch.Tensor.argmax'
]:
CondFunc
(
funcName
,
lambda
_
,
input
,
*
args
,
**
kwargs
:
torch
.
max
(
input
.
float
()
if
input
.
dtype
==
torch
.
int64
else
input
,
*
args
,
**
kwargs
)[
1
],
lambda
_
,
input
,
*
args
,
**
kwargs
:
input
.
device
.
type
==
'mps'
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment