FIXED: Unknown Argument --json when using Ultralytics YOLO on Mac

Im on Mac M1, running the following script after installing the Ultralyics library

Running the very simple script as follows:

Something seems to be happening when the model() function is called, where a --json argument is being passed. Another user has apparently successfully managed to run YOLO on windows, without this issue, YOLO v8 をTouchDesignerで使う - なるように、なる

Another user is receiving this same issue on Windows, that I’m receiving on Mac An unknown argument: --json · Issue #8803 · ultralytics/ultralytics · GitHub. Ultralytics github staff are claiming its a TD specific issue, since we’re not explicitly passing in a --json argument. I wouldn’t know where to start looking for the solution. Maybe a version specific issue? Im on 2023.11290. I dont have CUDA on my Mac, but it seems not required to run YOLO.

Any Ideas?

Hi @ButchBangher

I’ve started giving this a look.

While I have no solution at the moment, I can reproduce.

I’ll dig further in the coming days.

Best,
Michel

1 Like

Hello, just chiming back in here to say I’ve got the same issue on windows, as of version 2023.11880

Same line giving the same error. Sorry I can’t figure out what it means.

any news on this one @JetXS ?

from what I can tell this only happens when I use yolo / torch with cu124 in a script TOP (torch is a requirement of yolo).

If I force it to use cu121 or cu118 I don’t get that error

Hi @Achim

Thanks for the additional details.

I could get errors pointing to the YOLO libs but it didn’t lead to anything. I escalated the issue with the developers to have a deeper look with additional debugging tools.

Best,
Michel

This error sounds so familiar to the multiprocessing error. Maybe newer versions of torch started using the multiprocessing module and when this is run in TD this will call touchdesigner.exe instead python.exe

Hi - those issues will be fixed in the experimental branch of TouchDesigner when we publish it.

It had to do with a DLL conflict. Changes are too important to be brought to the stable branch.

This will fix both PyTorch 2.4.1, PyTorch 2.5.1, and YOLO usage.

In the meantime, users are advised to work with those in a separate python process if required.

Best,
Michel

2 Likes