lllyasviel / lllyasviel/sd-forge-layerdiffuse

[m1 pro] How to fix the problem?

Open
#62 13 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.1k
Forks
352
PR merge metrics
No merged PRs in 30d

Description

Moving model(s) has taken 0.91 seconds
100%|███████████████████████████████████████████| 20/20 [02:51<00:00, 8.59s/it]
To load target model AutoencoderKL██████████████| 20/20 [02:37<00:00, 8.22s/it]
Begin to load 1 model
Moving model(s) has taken 2.63 seconds
To load target model UNet1024
Begin to load 1 model
Moving model(s) has taken 0.24 seconds
100%|█████████████████████████████████████████████| 8/8 [00:14<00:00, 1.82s/it]
/AppleInternal/Library/BuildRoots/ce725a5f-c761-11ee-a4ec-b6ef2fd8d87b/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSNDArray/Kernels/MPSNDArraySort.mm:287: failed assertion `(null)" Axis = 4. This class only supports axis = 0, 1, 2, 3
'
./webui.sh: line 292: 2661 Abort trap: 6 "${python_cmd}" -u "${LAUNCH_SCRIPT}" "$@"
(base) mbp@MBP forge % /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with webui.sh around line 292 and the Python launch path, then investigate the MPSNDArraySort assertion reporting axis 4 while loading AutoencoderKL and UNet1024. Reproduce the crash on the reported Apple M1 setup and identify the model operation that triggers it; done means generation completes without the Metal assertion or abort.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python
Domain
machine-learning, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.