krita-ai-diffusion icon indicating copy to clipboard operation
krita-ai-diffusion copied to clipboard

Will the Mac version be updated in the future?

Open bingling00 opened this issue 2 years ago • 15 comments
trafficstars

This looks better than the PS plugin, looking forward to the Mac version

bingling00 avatar Nov 20 '23 08:11 bingling00

I've seen people running it on Mac. Krita supports it, the plugin generally works, and ComfyUI also has Mac support.

What may not work is the automated installer for the server - so you will have to install and setup ComfyUI yourself. It would be nice if someone could fix and occasionally test that so it can be "officially" supported.

Acly avatar Nov 20 '23 09:11 Acly

Make sure you download a release package from here: https://github.com/Acly/krita-ai-diffusion/releases It may fix this issue.

Acly avatar Nov 20 '23 11:11 Acly

I've seen people running it on Mac. Krita supports it, the plugin generally works, and ComfyUI also has Mac support.

What may not work is the automated installer for the server - so you will have to install and setup ComfyUI yourself. It would be nice if someone could fix and occasionally test that so it can be "officially" supported.

It worked for me on a Mac M1.

Trapper4888 avatar Nov 20 '23 15:11 Trapper4888

I've seen people running it on Mac. Krita supports it, the plugin generally works, and ComfyUI also has Mac support. What may not work is the automated installer for the server - so you will have to install and setup ComfyUI yourself. It would be nice if someone could fix and occasionally test that so it can be "officially" supported.

It worked for me on a Mac M1.

Just reporting my own experience, on an M1 MB Air: I can install the plug-in and connect to the Cloud GPU @ runpod.io but once I hit "Generate" it just sits in the queue. No progress bar updates or anything. I followed the instructions from the step by step guide to setup ComfyUI for Krita.

More details

This is what the UI looks like after selecting a portion of my drawing and pressing Generate:

image

ai_diffusion/.logs/ Logs:

2023-11-20 14:05:26,327 INFO Extension initialized, Version: 1.7.1, Python: 3.10.7 (main, Nov  1 2023, 10:10:21) [Clang 13.0.0 (clang-1300.0.29.30)]
2023-11-20 14:05:27,172 INFO Connecting to https://[SNIP].proxy.runpod.net
2023-11-20 14:05:27,917 INFO Found ControlNet model inpaint for SD 1.5: control_v11p_sd15_inpaint_fp16.safetensors
2023-11-20 14:05:27,918 INFO Found ControlNet model scribble for SD 1.5: control_lora_rank128_v11p_sd15_scribble_fp16.safetensors
2023-11-20 14:05:27,918 INFO Found ControlNet model line_art for SD 1.5: control_v11p_sd15_lineart_fp16.safetensors
2023-11-20 14:05:27,918 INFO Found ControlNet model line_art for SD XL: sai_xl_sketch_256lora.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model soft_edge for SD 1.5: control_v11p_sd15_softedge_fp16.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model canny_edge for SD 1.5: control_v11p_sd15_canny_fp16.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model canny_edge for SD XL: sai_xl_canny_256lora.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model depth for SD 1.5: control_lora_rank128_v11f1p_sd15_depth_fp16.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model depth for SD XL: sai_xl_depth_256lora.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model normal for SD 1.5: control_lora_rank128_v11p_sd15_normalbae_fp16.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model pose for SD 1.5: control_lora_rank128_v11p_sd15_openpose_fp16.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model pose for SD XL: thibaud_xl_openpose_256lora.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model segmentation for SD 1.5: control_lora_rank128_v11p_sd15_seg_fp16.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model blur for SD 1.5: control_lora_rank128_v11f1e_sd15_tile_fp16.safetensors
2023-11-20 14:05:27,921 INFO Found CLIP Vision model for All: SD1.5/pytorch_model.bin
2023-11-20 14:05:27,921 INFO Found IP-Adapter model for SD 1.5: ip-adapter_sd15.safetensors
2023-11-20 14:05:27,921 INFO Found IP-Adapter model for SD XL: ip-adapter_sdxl_vit-h.safetensors
2023-11-20 14:05:27,921 INFO Found LCM LoRA model for SD 1.5: lcm-lora-sdv1-5.safetensors
2023-11-20 14:05:27,921 INFO Found LCM LoRA model for SD XL: lcm-lora-sdxl.safetensors
2023-11-20 14:05:27,921 INFO SD 1.5: supported
2023-11-20 14:05:27,921 INFO SD XL: supported

runpod.io Logs:

2023-11-20T19:17:54.262853188Z got prompt
2023-11-20T19:17:55.286057280Z model_type EPS
2023-11-20T19:17:55.286095674Z adm 0
2023-11-20T19:17:55.884313970Z Using pytorch attention in VAE
2023-11-20T19:17:55.885059184Z Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
2023-11-20T19:17:55.886389155Z Using pytorch attention in VAE
2023-11-20T19:17:56.653180518Z missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
2023-11-20T19:17:56.653213554Z left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids'])
2023-11-20T19:17:58.666047142Z Requested to load CLIPVisionModelWithProjection
2023-11-20T19:17:58.666076827Z Loading 1 new model
2023-11-20T19:17:59.235159531Z Requested to load SD1ClipModel
2023-11-20T19:17:59.235184342Z Loading 1 new model
2023-11-20T19:17:59.684028713Z [] []
2023-11-20T19:18:00.046824475Z Requested to load BaseModel
2023-11-20T19:18:00.046852969Z Requested to load ControlNet
2023-11-20T19:18:00.046857970Z Loading 2 new models
2023-11-20T19:18:07.818910335Z 
  0%|          | 0/20 [00:00<?, ?it/s]
  5%|▌         | 1/20 [00:00<00:04,  4.60it/s]
 10%|█         | 2/20 [00:00<00:07,  2.46it/s]
 15%|█▌        | 3/20 [00:01<00:06,  2.61it/s]
 20%|██        | 4/20 [00:01<00:05,  2.69it/s]
 25%|██▌       | 5/20 [00:01<00:05,  2.74it/s]
 30%|███       | 6/20 [00:02<00:05,  2.76it/s]
 35%|███▌      | 7/20 [00:02<00:04,  2.78it/s]
 40%|████      | 8/20 [00:02<00:04,  2.79it/s]
 45%|████▌     | 9/20 [00:03<00:03,  2.80it/s]
 50%|█████     | 10/20 [00:03<00:03,  2.80it/s]
 55%|█████▌    | 11/20 [00:03<00:03,  2.81it/s]
 60%|██████    | 12/20 [00:04<00:02,  2.80it/s]
 65%|██████▌   | 13/20 [00:04<00:02,  2.80it/s]
 70%|███████   | 14/20 [00:05<00:02,  2.80it/s]
 75%|███████▌  | 15/20 [00:05<00:01,  2.80it/s]
 80%|████████  | 16/20 [00:05<00:01,  2.80it/s]
 85%|████████▌ | 17/20 [00:06<00:01,  2.80it/s]
 90%|█████████ | 18/20 [00:06<00:00,  2.80it/s]
 95%|█████████▌| 19/20 [00:06<00:00,  2.80it/s]
100%|██████████| 20/20 [00:07<00:00,  2.80it/s]

But as mentioned, the Krita panel UI doesn't update to reflect these iterations/results.

ZaneH avatar Nov 20 '23 19:11 ZaneH

Can someone explain how to make this work on a mac?

So there's a way to import the file via a "file import" button on the mac version (you just point it to the zip folder) or you can unzip the file in the folder pykrita. In either case it doesn't work as the settings for the dockers plugin just have the folder greyed out.

From what I read online that typically means an incompatibility with the code or that one of the dockers crashed a submodule that installs all of the dockers. I haven't looked at the Krita code base but that would be my guess - somehow this doesn't work on a mac M1 unless I'm missing something.

Screenshot 2023-11-20 at 11 24 15 AM

peterweyand62 avatar Nov 20 '23 19:11 peterweyand62

Can someone explain how to make this work on a mac?

So there's a way to import the file via a "file" on the mac version (you just point it to the zip folder) or you can unzip the file in the folder for Krita. In either case it doesn't work as the settings for Docker just have the folder greyed out.

You need to open a document first. It looks like you're still on the Krita startup menu.

ZaneH avatar Nov 20 '23 19:11 ZaneH

Ok. I installed the server and the requirements, but then I ran into this problem. Is there a reason why this dependency can't be found even though it says it's already installed and I installed it in my dependencies via both pip3 and requirements.txt?

Screenshot 2023-11-20 at 12 06 57 PM

peterweyand62 avatar Nov 20 '23 19:11 peterweyand62

Ok. I installed the server and the requirements, but then I ran into this problem. Is there a reason why this dependency can't be found even though it says it's already installed and I installed it in my dependencies via both pip3 and requirements.txt?

This is probably related to multiple python instances. My guess is that Krita is using a different python directory so it isn't picking up the deps you installed thru pip3. This probably isn't the right thread for setup support though.

ZaneH avatar Nov 20 '23 20:11 ZaneH

@ZaneH Someone on reddit had the same issue: https://www.reddit.com/r/StableDiffusion/comments/17xavuj/comment/k9xwkvl/?utm_source=share&utm_medium=web2x&context=3 Something about certificates, not sure how they solved it exactly though.

Acly avatar Nov 20 '23 22:11 Acly

@ZaneH Someone on reddit had the same issue: https://www.reddit.com/r/StableDiffusion/comments/17xavuj/comment/k9xwkvl/?utm_source=share&utm_medium=web2x&context=3 Something about certificates, not sure how they solved it exactly though.

Thanks for this. I left a comment on the thread to try and get a better solution.

This seems to work for now (source):

$ CERT_PATH=$(python3 -m certifi)
$ export SSL_CERT_FILE=${CERT_PATH}
$ export REQUESTS_CA_BUNDLE=${CERT_PATH}
$ cd /Applications/krita.app/Contents/MacOS/
$ ./krita

ZaneH avatar Nov 20 '23 23:11 ZaneH

@ZaneH Someone on reddit had the same issue: https://www.reddit.com/r/StableDiffusion/comments/17xavuj/comment/k9xwkvl/?utm_source=share&utm_medium=web2x&context=3 Something about certificates, not sure how they solved it exactly though.

Thanks for this. I left a comment on the thread to try and get a better solution.

This seems to work for now (source):

$ CERT_PATH=$(python3 -m certifi)
$ export SSL_CERT_FILE=${CERT_PATH}
$ export REQUESTS_CA_BUNDLE=${CERT_PATH}
$ cd /Applications/krita.app/Contents/MacOS/
$ ./krita

Where should I run it?

AmnonK1 avatar Nov 29 '23 08:11 AmnonK1

I've seen people running it on Mac. Krita supports it, the plugin generally works, and ComfyUI also has Mac support.我见过有人在 Mac 上运行它。 Krita 支持它,该插件通常可以工作,ComfyUI 也有 Mac 支持。 What may not work is the automated installer for the server - so you will have to install and setup ComfyUI yourself. It would be nice if someone could fix and occasionally test that so it can be "officially" supported. 服务器的自动安装程序可能不起作用 - 因此您必须自己安装和设置 ComfyUI。如果有人可以修复并偶尔测试它,以便它可以得到“官方”支持,那就太好了。

It worked for me on a Mac M1.它在 Mac M1 上对我有用。

Just reporting my own experience, on an M1 MB Air: I can install the plug-in and connect to the Cloud GPU @ runpod.io but once I hit "Generate" it just sits in the queue. No progress bar updates or anything. I followed the instructions from the step by step guide to setup ComfyUI for Krita.只是报告我自己在 M1 MB Air 上的经验:我可以安装插件并连接到 Cloud GPU @ runpod.io,但一旦我点击“生成”,它就会位于队列中。没有进度条更新什么的。我按照分步指南中的说明为 Krita 设置 ComfyUI。

More details 更多细节 This is what the UI looks like after selecting a portion of my drawing and pressing Generate:这是选择绘图的一部分并按“生成”后的 UI 外观:

image `ai_diffusion/.logs/` Logs:  `ai_diffusion/.logs/` 日志:
2023-11-20 14:05:26,327 INFO Extension initialized, Version: 1.7.1, Python: 3.10.7 (main, Nov  1 2023, 10:10:21) [Clang 13.0.0 (clang-1300.0.29.30)]
2023-11-20 14:05:27,172 INFO Connecting to https://[SNIP].proxy.runpod.net
2023-11-20 14:05:27,917 INFO Found ControlNet model inpaint for SD 1.5: control_v11p_sd15_inpaint_fp16.safetensors
2023-11-20 14:05:27,918 INFO Found ControlNet model scribble for SD 1.5: control_lora_rank128_v11p_sd15_scribble_fp16.safetensors
2023-11-20 14:05:27,918 INFO Found ControlNet model line_art for SD 1.5: control_v11p_sd15_lineart_fp16.safetensors
2023-11-20 14:05:27,918 INFO Found ControlNet model line_art for SD XL: sai_xl_sketch_256lora.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model soft_edge for SD 1.5: control_v11p_sd15_softedge_fp16.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model canny_edge for SD 1.5: control_v11p_sd15_canny_fp16.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model canny_edge for SD XL: sai_xl_canny_256lora.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model depth for SD 1.5: control_lora_rank128_v11f1p_sd15_depth_fp16.safetensors
2023-11-20 14:05:27,919 INFO Found ControlNet model depth for SD XL: sai_xl_depth_256lora.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model normal for SD 1.5: control_lora_rank128_v11p_sd15_normalbae_fp16.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model pose for SD 1.5: control_lora_rank128_v11p_sd15_openpose_fp16.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model pose for SD XL: thibaud_xl_openpose_256lora.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model segmentation for SD 1.5: control_lora_rank128_v11p_sd15_seg_fp16.safetensors
2023-11-20 14:05:27,920 INFO Found ControlNet model blur for SD 1.5: control_lora_rank128_v11f1e_sd15_tile_fp16.safetensors
2023-11-20 14:05:27,921 INFO Found CLIP Vision model for All: SD1.5/pytorch_model.bin
2023-11-20 14:05:27,921 INFO Found IP-Adapter model for SD 1.5: ip-adapter_sd15.safetensors
2023-11-20 14:05:27,921 INFO Found IP-Adapter model for SD XL: ip-adapter_sdxl_vit-h.safetensors
2023-11-20 14:05:27,921 INFO Found LCM LoRA model for SD 1.5: lcm-lora-sdv1-5.safetensors
2023-11-20 14:05:27,921 INFO Found LCM LoRA model for SD XL: lcm-lora-sdxl.safetensors
2023-11-20 14:05:27,921 INFO SD 1.5: supported
2023-11-20 14:05:27,921 INFO SD XL: supported

runpod.io Logs: runpod.io 日志:

2023-11-20T19:17:54.262853188Z got prompt
2023-11-20T19:17:55.286057280Z model_type EPS
2023-11-20T19:17:55.286095674Z adm 0
2023-11-20T19:17:55.884313970Z Using pytorch attention in VAE
2023-11-20T19:17:55.885059184Z Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
2023-11-20T19:17:55.886389155Z Using pytorch attention in VAE
2023-11-20T19:17:56.653180518Z missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
2023-11-20T19:17:56.653213554Z left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids'])
2023-11-20T19:17:58.666047142Z Requested to load CLIPVisionModelWithProjection
2023-11-20T19:17:58.666076827Z Loading 1 new model
2023-11-20T19:17:59.235159531Z Requested to load SD1ClipModel
2023-11-20T19:17:59.235184342Z Loading 1 new model
2023-11-20T19:17:59.684028713Z [] []
2023-11-20T19:18:00.046824475Z Requested to load BaseModel
2023-11-20T19:18:00.046852969Z Requested to load ControlNet
2023-11-20T19:18:00.046857970Z Loading 2 new models
2023-11-20T19:18:07.818910335Z 
  0%|          | 0/20 [00:00<?, ?it/s]
  5%|▌         | 1/20 [00:00<00:04,  4.60it/s]
 10%|█         | 2/20 [00:00<00:07,  2.46it/s]
 15%|█▌        | 3/20 [00:01<00:06,  2.61it/s]
 20%|██        | 4/20 [00:01<00:05,  2.69it/s]
 25%|██▌       | 5/20 [00:01<00:05,  2.74it/s]
 30%|███       | 6/20 [00:02<00:05,  2.76it/s]
 35%|███▌      | 7/20 [00:02<00:04,  2.78it/s]
 40%|████      | 8/20 [00:02<00:04,  2.79it/s]
 45%|████▌     | 9/20 [00:03<00:03,  2.80it/s]
 50%|█████     | 10/20 [00:03<00:03,  2.80it/s]
 55%|█████▌    | 11/20 [00:03<00:03,  2.81it/s]
 60%|██████    | 12/20 [00:04<00:02,  2.80it/s]
 65%|██████▌   | 13/20 [00:04<00:02,  2.80it/s]
 70%|███████   | 14/20 [00:05<00:02,  2.80it/s]
 75%|███████▌  | 15/20 [00:05<00:01,  2.80it/s]
 80%|████████  | 16/20 [00:05<00:01,  2.80it/s]
 85%|████████▌ | 17/20 [00:06<00:01,  2.80it/s]
 90%|█████████ | 18/20 [00:06<00:00,  2.80it/s]
 95%|█████████▌| 19/20 [00:06<00:00,  2.80it/s]
100%|██████████| 20/20 [00:07<00:00,  2.80it/s]

But as mentioned, the Krita panel UI doesn't update to reflect these iterations/results.但如前所述,Krita 面板 UI 不会更新以反映这些迭代/结果。

the same problem! Have you solved? I really need to connect to the Cloud GPU @ runpod.iom, please🙏

hyh813 avatar Dec 01 '23 08:12 hyh813

@ZaneH Someone on reddit had the same issue: https://www.reddit.com/r/StableDiffusion/comments/17xavuj/comment/k9xwkvl/?utm_source=share&utm_medium=web2x&context=3 Something about certificates, not sure how they solved it exactly though. reddit 上的有人也有同样的问题: https://www.reddit.com/r/StableDiffusion/comments/17xavuj/comment/k9xwkvl/?utm_source=share&utm_medium=web2x&context=3 有关证书的问题,但不确定他们是如何解决的。

Thanks for this. I left a comment on the thread to try and get a better solution.谢谢你。我在该线程上留下了评论,以尝试获得更好的解决方案。

This seems to work for now (source):这似乎目前有效(来源):

$ CERT_PATH=$(python3 -m certifi)
$ export SSL_CERT_FILE=${CERT_PATH}
$ export REQUESTS_CA_BUNDLE=${CERT_PATH}
$ cd /Applications/krita.app/Contents/MacOS/
$ ./krita

Thanks a lot, respect

hyh813 avatar Dec 03 '23 03:12 hyh813

I have it working on an M2 mini. After some experimentation I found that if I used pdm to set up the folder pykrita as a package then everything fell into place painlessly. A .venv file was created and all required python 3.10 files were installed. It then all "just worked" as per the installation instructions.

PDM is a Python package and dependency manager. Download from: https://github.com/pdm-project/pdm

NB. the word 'Settings' is accurate but ambiguous in the instructions. For Instruction 3 on MacOS 'Settings ‣ Configure Krita' = 'Krita ‣ Preferences' For Instruction 5 the word settings refers to Settings in the main menu bar.

RobBW avatar Feb 09 '24 10:02 RobBW

@ZaneH Someone on reddit had the same issue: https://www.reddit.com/r/StableDiffusion/comments/17xavuj/comment/k9xwkvl/?utm_source=share&utm_medium=web2x&context=3 Something about certificates, not sure how they solved it exactly though.

Thanks for this. I left a comment on the thread to try and get a better solution.

This seems to work for now (source):

$ CERT_PATH=$(python3 -m certifi)
$ export SSL_CERT_FILE=${CERT_PATH}
$ export REQUESTS_CA_BUNDLE=${CERT_PATH}
$ cd /Applications/krita.app/Contents/MacOS/
$ ./krita

Thank You, so much I'm create ComfyUI for Krita colab use as cloud but stuck the same problem.

SalmonRK avatar May 16 '24 11:05 SalmonRK

I don't know whats up with my macbook, but i cannot get it to work with the normal install.

I've deleted Krita, and made sure brew is up to date, and reinstalled via Brew. when i connect the runpod and try to generate, nothing shows up, but in the logs i can see it running and generating an image.

However, if I start Krita with a script and add the ssl certs as env variables, it works fine. here is the script I used to make it work. I've tried adding this to my zshrc but it doesnt seem to load?

#!/bin/bash

export PATH="/opt/homebrew/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
export SSL_CERT_FILE="/Users/briceneal/krita-env/myenv/lib/python3.12/site-packages/certifi/cacert.pem"

open /Applications/Krita.app
Open Automator:
    Launch Automator from your Applications folder.

Create a New Document:
    Select "New Document".
    Choose "Application" and click "Choose".

Add a Run Shell Script Action:
    In the search bar, type "Run Shell Script".
    Double-click on "Run Shell Script" to add it to your workflow.

Configure the Shell Script:
    Set the "Shell" to /bin/bash.
    Set the "Pass input" to "as arguments".
    Replace the default script with your custom environment setup and Krita launch script:
#!/bin/bash

export PATH="/opt/homebrew/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
export SSL_CERT_FILE="/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/certifi/cacert.pem"

open /Applications/Krita.app

Save the Application:

Go to "File" > "Save".
Name the application "Launch Krita" and save it in a different location than the Applications folder to avoid overwriting again (e.g., Desktop or a custom folder).

Add to Dock:

Drag the newly created "Launch Krita" application to your Dock for easy access.

deresolution20 avatar Jun 09 '24 20:06 deresolution20

I hope since merge of #841 the SSL certificate issue is resolved inside the plugin

Acly avatar Jun 23 '24 19:06 Acly

Image

Can anyone help me with this error?

BMJart avatar Feb 23 '25 11:02 BMJart