Connecting Flame with ComfyUI via OpenClip

It’s the ltx-2.3-22b-ic-lora-hdr-scene-emb.safetensors model from Huggingface.

I run ComfyUI inside an Anaconda3 shell, which completely isolates the python environment. I also run with a separate aiuser id which is locked down in terms of security. That’s been working pretty well.

Sorry, I didn’t ask the right question; is that the LoRA model you’re using in the image?

Jan, can’t you just share the workflow json?

Of course.

Example.zip (6.1 KB)

Cheers

If you download the latest ComfUI-LTX nodes, they have a bug and the install will fail. You have to change two lines of code in one of the nodes to fix it. Quick claude query will guide you. Or I can dig it back up.

I had this two days ago, and I saw it had something to do with the KJ nodes so I just updated both LTX nodes and KJ nodes and everything worked as expected. I think KJ did some PR on the LTX nodes which had something linked to its nodes somehow.

What python version are you using? Are you mixing models (sam3 & ltx) in your scripts?

Currently on 3.12. Haven’t tried Sam3 I think. Have Sam2 in a few workflows.

If you watched the Logik Live yesterday, I figured out the issue from the demo. Both pilot error situations.

The Flame setup has a Mux to demo both the color space transform happening in Flame or in ComfyUI. It was set on the wrong input leading to a double transform (Flame & Comfy).

Also need to improve the writer node to make it smarter if the version it’s trying to write already exists (which is what happened). Either give a more meaningful error in the UI, or better yet, have the node auto-advance the version number as Flame does.

The trials & tribulations of making software work in production.

Interesting expansion to this workflow:

Round-tripping an ROI of your shot while keeping the color space intact.

In this test case, I have Canon Log2 coming in, and need to run ProPainter on a small section to remove something. I’d rather keep it in Log2 all the way through, and be able to blend it on the other side seamlessly.

What so far seems to work well:

After cutting the region of interest, do a contrast normalization. That gives the model something close what it can recognize, but can be inverted easily. The new Flame Pixel expressions coming in handy here:

slight blur followed by recursiveops to find the brightest and darkest pixel values in the ROI. Sampled with color sampler. Then fed into a Pixel expression. The measure min/max go into IMAX and IMIN, rest are constants.

Inverse formula after it comes back from ComfyUI is then

IMIN + (IMAX-IMIN)*P*sign(r1-LO)*pow(abs((r1-LO)*K/((HI-LO)*P)), 1.0/G)

With the OpenClip nodes and ProPainter which defaults to 32fp, everything stays in log and 16fp bit depth or above.

That’s a good step forward…

For everyone’s convenience, these nodes are now listed in ComfyUI, so you can install them via the Manager UI in ComfyUI.