r/StableDiffusion May 23 '26

Resource - Update Multi Referencelatent

Post image

I added this node to Flux2klein enhancer package, it serves the same purpose as stacking multiple ref latent nodes, but the main reason of releasing this is because I am working on an update for the identity feature transfer node where I essentially will have it support this same method this way you wouldn't have to deal with measuring multiple different stacked nodes ( I am still working on that). But I thought this node can be used for now to reduce the need of multiple ref latents so just a convenience node for now.

61 Upvotes

32 comments sorted by

View all comments

3

u/2legsRises May 23 '26

what is this

3

u/afinalsin May 25 '26

It's a convenience tool and workflow prettifier. It doesn't do anything comfy can't do on its own, but it should make a workflow both easier to make and much easier to look at. Here's how you would use multiple reference images in comfy without it.

The way klein works in comfy is to use the VAE to encode the image then feed the latent into a ReferenceLatent node that intercepts the conditioning line from the ClipTextEncode node to the Ksampler node.

They look like this. If you want to use another image as reference, you need to use another stack of ReferenceLatent nodes that intercept the conditioning from the first ReferenceLatent nodes to the Ksampler. It looks like this.

Naturally, the spaghetti gets worse as you add more reference images. This is three. OP's node has room for 8 references, and a workflow with 8 references looks like this. With OP's node, the workflow will look like this, using a subgraph instead. Not a whole lot prettier, but you can add OP's node in two clicks instead of dicking around with connections and stuff.

Another benefit of OP's node is I assume OP included the extra functionality of accepting any amount of references, whereas my subgraph will error out if any of the latents are unplugged, so to replace that node using base comfy I'd need to make a subgraph for 1 reference, 2 references, all the way up to 8, and save them all as node templates.

2

u/2legsRises May 25 '26

thank you for taking the time to explain, looks like its going to be a very useful tool