Yea, that's the core problem here: plugins can add new CLI subcommands, which means they all need to be loaded on startup.
https://llm.datasette.io/en/stable/plugins/plugin-hooks.html...
https://llm.datasette.io/en/stable/plugins/plugin-hooks.html...
I'm happy with the solution I have now, which is to encourage plugin authors not to import PyTorch or other heavy dependencies at the root level of their plugin code.
That might be considered a design mistake -- one that should be easy to migrate away from.
You won't need to do anything, of course, if the lazy import becomes available on common Python installs some day in the future. That might take years, though.