Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Error: MLIR pass manager failed #7667

Open
1 task done
joselael opened this issue Feb 21, 2025 · 6 comments
Open
1 task done

[bug]: Error: MLIR pass manager failed #7667

joselael opened this issue Feb 21, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@joselael
Copy link

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

macOS

GPU vendor

Apple Silicon (MPS)

GPU model

M2 Ultra

GPU VRAM

128GB

Version number

v5.6.2

Browser

Invoke Community Edition

Python dependencies

No response

What happened

Invoke crashes while generating image:

Starting up...
Started Invoke process with PID: 17420
>> patchmatch.patch_match: INFO - Compiling and loading c extensions from "/Users/jose_louis/Applications/.venv/lib/python3.11/site-packages/patchmatch".
>> patchmatch.patch_match: ERROR - patchmatch failed to load or compile (Command 'make clean && make' returned non-zero exit status 2.).
>> patchmatch.patch_match: INFO - Refer to https://invoke-ai.github.io/InvokeAI/installation/060_INSTALL_PATCHMATCH/ for installation instructions.
[2025-02-21 12:48:55,100]::[InvokeAI]::INFO --> Patchmatch not loaded (nonfatal)
[2025-02-21 12:48:55,582]::[InvokeAI]::INFO --> Using torch device: MPS
[2025-02-21 12:48:55,704]::[InvokeAI]::INFO --> InvokeAI version 5.6.2
[2025-02-21 12:48:55,704]::[InvokeAI]::INFO --> Root directory = /Users/jose_louis/Applications
[2025-02-21 12:48:55,704]::[InvokeAI]::INFO --> Initializing database at /Users/jose_louis/Applications/databases/invokeai.db
[2025-02-21 12:48:55,705]::[InvokeAI]::INFO --> Database update needed
[2025-02-21 12:48:55,705]::[InvokeAI]::INFO --> Backing up database to /Users/jose_louis/Applications/databases/invokeai_backup_20250221-124855.db
[2025-02-21 12:48:55,707]::[InvokeAI]::INFO --> Database updated successfully
[2025-02-21 12:48:55,709]::[ModelManagerService]::INFO --> [MODEL CACHE] Calculated model RAM cache size: 32768.00 MB. Heuristics applied: [1, 2].
[2025-02-21 12:48:55,711]::[InvokeAI]::INFO --> Pruned 1 finished queue items
[2025-02-21 12:48:55,735]::[InvokeAI]::INFO --> Cleaned database (freed 0.01MB)
[2025-02-21 12:48:55,735]::[InvokeAI]::INFO --> Invoke running on http://127.0.0.1:9090/ (Press CTRL+C to quit)
[2025-02-21 12:48:58,511]::[InvokeAI]::INFO --> Executing queue item 12, session 9df489c5-3100-40b8-b123-5df524de9c95

Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]
Loading checkpoint shards:  50%|█████     | 1/2 [00:00<00:00,  2.50it/s]
Loading checkpoint shards: 100%|██████████| 2/2 [00:00<00:00,  2.67it/s]
Loading checkpoint shards: 100%|██████████| 2/2 [00:00<00:00,  2.64it/s]
[2025-02-21 12:49:01,726]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '7e59db0b-6548-4426-8a0c-9da82e2f47a1:text_encoder_2' (T5EncoderModel) onto mps device in 2.28s. Total model size: 9083.39MB, VRAM: 9083.39MB (100.0%)
[2025-02-21 12:49:01,813]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '7e59db0b-6548-4426-8a0c-9da82e2f47a1:tokenizer_2' (T5Tokenizer) onto mps device in 0.00s. Total model size: 0.03MB, VRAM: 0.00MB (0.0%)
[2025-02-21 12:49:02,893]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '24b521c5-06a2-4b38-8207-df478ca17a6b:text_encoder' (CLIPTextModel) onto mps device in 0.08s. Total model size: 469.44MB, VRAM: 469.44MB (100.0%)
[2025-02-21 12:49:02,941]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '24b521c5-06a2-4b38-8207-df478ca17a6b:tokenizer' (CLIPTokenizer) onto mps device in 0.00s. Total model size: 0.00MB, VRAM: 0.00MB (0.0%)
/AppleInternal/Library/BuildRoots/27093e68-e5c4-11ef-8448-fe9e33ca05fa/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphExecutable.mm:3532: failed assertion `Error: MLIR pass manager failed'
/Users/jose_louis/.local/share/uv/python/cpython-3.11.11-macos-aarch64-none/lib/python3.11/multiprocessing/resource_tracker.py:254: 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 '
Process exited with code: 0

What you expected to happen

The image be generated

How to reproduce the problem

No response

Additional context

Using unquantized Flux dev version from Invoke

Discord username

No response

@joselael joselael added the bug Something isn't working label Feb 21, 2025
@mystikal1000
Copy link

Is the new beta causing it, 15.4?

@lcytzk
Copy link

lcytzk commented Feb 24, 2025

I have samilar issue, but not for this project.
It happened from several days ago. Maybe something about MacOS cause this.

@discordinated
Copy link

Same on beta 15.4... across invoke + comfyui

@lcytzk
Copy link

lcytzk commented Feb 25, 2025

Same on beta 15.4... across invoke + comfyui

comfyui as well!

@psychedelicious
Copy link
Collaborator

Unfortunately I we cannot do anything if the issue only occurs on specific macOS versions. We'll need to wait for pytorch to fix it (or macOS to get a fix).

@steffenr
Copy link

Same for me - i updated to latest 15.4 and got the bug afterwards ;(..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants