Comfy-Org / Comfy-Org/ComfyUI

Use ComfyUI (SDXL) on MacOS (MacBook Pro M1)

Open
#1,905 1 comment 0 reactions 0 assignees View on GitHub
User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

Hi

I try ComfyUI on my MacBook Pro M1.

On the Load Defaut Model and (revAnimated_v11.safetensors SD1.5) generate image take a few secondes, maibye 40-50 secondes is very quick and nice

But on the SDXL ... it's take 45mn, 1h i dont understund why :/

I try 2 models but is the same ...

I share you some screens if can help ?

Capture d’écran 2023-11-04 à 21 07 57
![Capture d’écran 2023-11-04 à 21 08 06](https://github.com/comfyanonymous/ComfyUI/assets/92268877/630c3f88-542a-48b1-a337-856bc799f52a)

Here, 2 template i have tested:

[SDXL + Refiner (default).json](https://github.com/comfyanonymous/ComfyUI/files/13257627/SDXL.%2B.Refiner.default.json)
[Workflow SDXL BASE-REFINER-LORA.json](https://github.com/comfyanonymous/ComfyUI/files/13257628/Workflow.SDXL.BASE-REFINER-LORA.json)

If can help i see this in console:
```

╭─    ~/ComfyUI    master !1 ?2 ──────────────────────────────────────────── ✔  21:14:44  ─╮
╰─ python3 main.py ─╯
Total VRAM 16384 MB, total RAM 16384 MB
Set vram state to: SHARED
Device: mps
VAE dtype: torch.float32
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
Starting server

To see the GUI go to: http://127.0.0.1:8188
got prompt
model_type EPS
adm 2816
Using split attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using split attention in VAE
missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids'])
Requested to load SDXLClipModel
Loading 1 new model
Requested to load SDXL
Loading 1 new model
0%| | 0/20 [00:00>> import torch
>>> if torch.backends.mps.is_available():
... mps_device = torch.device("mps")
... x = torch.ones(1, device=mps_device)
... print (x)
... else:
... print ("MPS device not found.")
...
tensor([1.], device='mps:0')
>>>
```

Other Test:

```
╭─    ~ ──────────────────────────────────────────────── ✔  23:36:57  ─╮
╰─ python3 ─╯
Python 3.11.6 (main, Oct 2 2023, 13:45:54) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
2.1.0
>>> print(torch.backends.mps.is_available())
True
>>> print(torch.backends.mps.is_built())
True
>>>
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.