LightCraft and ComfyUI


Another weekend project of mine—although “spare-time curiosity to see how far I can push this” is probably more accurate. But first, some context.

Context

A month or so ago, the software development world was set ablaze by clean-room implementations of various Adobe and Microsoft applications. They’re open source and available on GitHub. I’ve tried PhotoCraft, LightCraft, WordCraft, GridCraft and DeckCraft, and I’m impressed.

Craft-galore

What fascinates me isn’t the prospect of another nail in Adobe’s coffin. It’s the thinking behind these apps. They didn’t just re-create them; they reconsidered how applications should be built today.

For starters, they’re built in Rust, with its focus on memory safety and speed—and watching them launch on my ageing M1 Mac Studio is a joy. This also means they can run on Linux, Windows or MacOs. Each application also has a service port for remote control, right down to letting me control a button press. Better still, each has a standalone CLI (command-line interface), so agents can work without the desktop application running. Point Claude or ChatGPT at the CLI and create what you need.

This works so well that I’m itching to replace my open-source photo catalogue, digiKam, with their Lightroom equivalent, LightCraft. With over 200,000 pictures, switching requires keeping the catalogue intact and adapting my workflow—although LightCraft resembles Lightroom closely enough that it would feel like returning to my old one.

I’ve already hacked together a digiKam-to-LightCraft conversion tool. Incidentally, I previously built one for moving from Lightroom to digiKam.

But I’m an Olympus shooter—a sucker for m43—and LightCraft lacks support for Olympus and OM System ORF raw files (still). Here’s where things get interesting.

PR360

Someone added ORF support in PR #360 (a pull request to amend the code), but it wasn’t accepted because it didn’t meet the project’s clean-room requirements. So I merged it locally to see how well it handled my files. Remarkably well, as it turns out.

While waiting for a proper clean-room implementation, I had another idea: with the source code already on my computer, could I make LightCraft work with ComfyUI?

This is probably not what photographers should do, but here we are. ComfyUI lets you run image-generation workflows locally with suitable hardware. My idea was simple: mask something in a photo, send the original and mask to an image model with a prompt, then return the result to LightCraft.

Masking in LightCraft and then sending the masked and original image to ComfyUI

You can do much the same thing with ChatGPT. My goal was to see how far I could push Claude Code to build a feature inside a fairly large existing codebase.

PR3268

Two hours later, I had it. It’s not perfect, but it works.

ComfyUI settings in LightCraft with the image model, ComfyUI server IP and the generic prompt.

The user prompt, the seed and the complete prompt.

The resulting image. Not perfect but getting there.

I submitted it as PR #3268. I don’t intend to have it merged—ever. I just needed it somewhere accessible from my other computers.

Then the number hit me: PR 3268, roughly a month into the project. As I write this on October 31st, LightCraft alone has 4,795 commits, with a new release every one or two days.

There are two forces at work, imho:

a) Tremendous enthusiasm from developers and the open-source community at the prospect of a replacement that could match or surpass the commercial options.

b) AI. The vast majority of the code was written by coding agents. LightCraft even has built-in statistics tracking AI contributions. There’s an armada of agents contributing daily, and that’s what AI enables: speed.

AI coding most of it

Anyway, I’ll keep watching the project and adding to my own PR until I finally make the move to LightCraft.

PS: I’m writing this in WordCraft.

Comments