chaiNNer icon indicating copy to clipboard operation
chaiNNer copied to clipboard

0.11.5 on macos Big Sur 11.6

Open dem10com opened this issue 2 years ago • 44 comments

In this version, the installation went smoothly and I downloaded the ncnn packages. but this time the model I am using on windows and I am sure it works (4x-UltraSharp-opt-fp16.bin ) gives a black screen. Anyone have experience with this before?

Screen Shot 2022-08-29 at 12 24 43

dem10com avatar Aug 29 '22 09:08 dem10com

By the way, the reason for using ncnn is that the others are not using the gpu. pytorch is using only the cpu.

thank you

dem10com avatar Aug 29 '22 09:08 dem10com

It seems like ncnn on macos is still broken unfortunately. It has something to do with vulkan, and I'm not sure what I can do to fix it. But I'll try

joeyballentine avatar Aug 29 '22 13:08 joeyballentine

It seems like ncnn on macos is still broken unfortunately. It has something to do with vulkan, and I'm not sure what I can do to fix it. But I'll try

thanks a lot Joey

dem10com avatar Aug 29 '22 13:08 dem10com

i try macbook pro m1 (Macos Monterey 12.5.1 ) work perfectly and very fast. but Onnx cannot be installed in this either.

Screen Shot 2022-08-29 at 18 01 26

dem10com avatar Aug 29 '22 15:08 dem10com

Onnx does not have an arm64 (m1) version, therefore it is unable to be installed.

joeyballentine avatar Aug 29 '22 15:08 joeyballentine

Also this is the first I've heard of the ncnn m1 version I just released working. I was last told it produced black outputs as well. So this is good news I guess :)

joeyballentine avatar Aug 29 '22 15:08 joeyballentine

oh, Now I noticed that if it is more than 512x512 image size it gives a black screen.

dem10com avatar Aug 29 '22 15:08 dem10com

Thats probably due to the auto tiling then. If you set a target tile size of 512 does it always work?

joeyballentine avatar Aug 29 '22 15:08 joeyballentine

Hey @dem10com, I think I fixed this issue with 0.11.6 and the ncnn update that came with it. Could you give that a try?

joeyballentine avatar Aug 30 '22 01:08 joeyballentine

@joeyballentine i try, install and update ncnn (2022.8.29). But i am getting this error.

An error occurred in a NCNN Upscale Image node:

An unexpected error occurred during NCNN processing.

Input values (partial): • Image: RGB image 2048x2048 • Tile Size Target: 0 Screen Shot 2022-08-30 at 13 15 34

I change the tile size target but nothing change.

Hey @dem10com, I think I fixed this issue with 0.11.6 and the ncnn update that came with it. Could you give that a try?

dem10com avatar Aug 30 '22 10:08 dem10com

Can you set the target tile size to 0 (auto) and try again? I believe that error means you ran out of vram

joeyballentine avatar Aug 30 '22 10:08 joeyballentine

@joeyballentine I tried with "0" at first and it didn't work. and try again nothing change. by the way my gpu is radeon RX 5700 XT 8gb.

Screen Shot 2022-08-30 at 13 57 51

dem10com avatar Aug 30 '22 10:08 dem10com

Oh that's weird. Well in that case could you try a lower v tile size target like 512

joeyballentine avatar Aug 30 '22 11:08 joeyballentine

@joeyballentine here is the results;

Screen Shot 2022-08-30 at 14 24 20

but if i exit the program and start it again. It works for a 512x512 image. same way when i restart i get same error on 2048x2048 or 1024x1024 master file. most likely vram error as you said

Screen Shot 2022-08-30 at 14 26 19

dem10com avatar Aug 30 '22 11:08 dem10com

Interesting. I wonder if it's not properly clearing out the vram after crashing when this happens. Can you tell by your vram in task manager or something that chaiNNer still has the vram allocated when this happens?

joeyballentine avatar Aug 30 '22 12:08 joeyballentine

If it was, shouldn't I get a good result for the 2048x2048 master file when I turn on the computer for the first time?

When I check after getting the error, I get the result like this. 5 pyton 3.9 procces running in background. I just realized that even after exiting the program these continue to run in the background

Alphabetic Sort

Screen Shot 2022-08-30 at 15 11 09

using first time chainner. Screen Shot 2022-08-30 at 15 16 38

dem10com avatar Aug 30 '22 12:08 dem10com

i reset my computer. Run chainner. Look at my vram on statics. Almost empty

Screen Shot 2022-08-30 at 15 35 28

After i run and get error and quit application. memory never clear.

Screen Shot 2022-08-30 at 15 36 36

dem10com avatar Aug 30 '22 12:08 dem10com

After waiting for a while, the memory is still not reset, and when you close the Pyton 3.9 on my background proccess vram is resetting.

Screen Shot 2022-08-30 at 15 41 21

dem10com avatar Aug 30 '22 12:08 dem10com

i think the problem is python 3.9 is constantly running in the background even though we quit chainner.

dem10com avatar Aug 30 '22 12:08 dem10com

Oh wow that's not good. chaiNNer is supposed to quit its backend when it closes. Maybe there's something specific on Mac causing that to not work properly. Does that happen no matter what, or only if you get an ncnn error?

joeyballentine avatar Aug 30 '22 13:08 joeyballentine

I only use ncnn on mac, so I can say yes. I tried cpu mode and pytorch, there is no such problem.

dem10com avatar Aug 30 '22 13:08 dem10com

Ok, yeah that might be an issue. Can you send your logs over?

joeyballentine avatar Aug 30 '22 13:08 joeyballentine

sure;

main.log renderer.log

dem10com avatar Aug 30 '22 14:08 dem10com

Ok, this looks like one of three things:

  • I either need to ignore vkQueueSubmit errors
  • I need to manually flush vram on vkQueueSubmit error
  • I need to go back and update ncnn to not raise en exception on vkQueueSubmit error

I'll investigate a bit, but idk how much I can accomplish without being able to test it myself

joeyballentine avatar Aug 30 '22 14:08 joeyballentine

I'm here whenever you need to test.

thank you Joey.

dem10com avatar Aug 30 '22 14:08 dem10com

@dem10com could you try installing this? Install the .whl file via command line by doing /Application Support/chaiNNer/python/python/bin/python3.9 -m pip install /whatever/the/path/to/the/wheel/is.whl

Please let me know if the python process continues to get stuck using this build, or if it successfully quits now. Thanks.

ncnn-vulkan-python-vkQueuefailure-test-1-macos_cp39-macosx_arm64.zip

joeyballentine avatar Aug 30 '22 20:08 joeyballentine

@joeyballentine i try but, i am not using ARM. My macos system is intel based hardware. ( hackintosh )

ERROR: ncnn_vulkan-2022.8.30-cp39-cp39-macosx_11_0_arm64.whl is not a supported wheel on this platform.

dem10com avatar Aug 31 '22 07:08 dem10com

Oh my bad. I will upload the correct one soon.

joeyballentine avatar Aug 31 '22 11:08 joeyballentine

I install, Run chainner and dfter exiting the program, it still continues to run in the background. memory usage is almost %100. But the high resolution file (2048x2048) I tried before gave black result instead of the error I got. Screen Shot 2022-08-31 at 15 03 13

dem10com avatar Aug 31 '22 12:08 dem10com