huggingface / controlnet_aux

Apache License 2.0
400 stars 86 forks source link

Fix for PyInstaller #95

Closed Moebits closed 3 months ago

Moebits commented 8 months ago

This dependency doesn't work with PyInstaller, with error:

TorchScript requires source access in order to carry out compilation, make sure original .py files are available.

The solution is to replace torch.jit.script with torch.jit.script_if_tracing.