Adapting the code to run on node.js may not be too terrible - I haven't looked at the repo (on mobile), but I've had luck porting non-DOM-related client js libs to server libs before.
I’d be concerned that something like that needs user feedback to do a really good job. When I try to do that with photoshop it is never quite right the first time though maybe the new A.I. models can do better.