ImagePlus KSampler Adv
One toggle for img2img vs txt2img, with the VAE encode built in
- model
- vae
- positive
- negative
- image
- samples
- vae
The ImagePlus KSampler Adv is a KSampler that ate the whole setup around it. In a normal graph, img2img means VAE Encode → latent switch → KSampler, and txt2img means Empty Latent Image → KSampler, and switching between the two means rewiring or installing a LatentSwitch. This node folds all of that into a single sampler with a boolean named image_in. Flip it on and the connected IMAGE gets VAE-encoded and sampled; flip it off and it builds an empty latent at your chosen size. That's the entire idea, and it works.
How it works
Under the hood it's honest plumbing. With image_in on, it runs vae.encode on the connected image tensor and feeds the latent to ComfyUI's standard common_ksampler with your settings. With image_in off, it builds a torch.zeros latent of [batch, 4, height//8, width//8] - the same empty-latent shape ComfyUI's core node makes - and samples that. No custom sampling math, no special schedulers; the sampler_name dropdown lists all 44 samplers core knows and the scheduler dropdown has the usual 9. It's a convenience wrapper, not a new sampling algorithm.
The inputs that matter
image_in(BOOLEAN) - the toggle that switches between image-to-image and text-to-image. This is the whole point of the node.image(optional IMAGE) - only read whenimage_inis on. Leave it disconnected and flip the toggle on, and you get a hard error straight from the code: "ImagePlus KSampler Adv is set to Image In, but no image is connected."width,height,batch_size- only used whenimage_inis off. This is the trap: in image mode these widgets are ignored, and the input image defines the output size. People flip the toggle, keep generating at 1024x1024, and assume the node is broken.seed,steps,cfg,sampler_name,scheduler- the usual sampler controls. Nothing exotic here.denoise- the one that will actually bite you.
The outputs
samples(LATENT) - wire this into a VAE Decode.vae(VAE) - a pass-through of the VAE you connected, which also feeds VAE Decode. You never drag a second VAE wire across the graph.
Denoise, or: how to nuke your reference image
The README spells this out and it's the classic img2img failure mode. In image mode you want denoise below 1.0 - typically 0.35 to 0.75 - so the sampler keeps the structure of your reference and restyles it. At 1.0, img2img behaves exactly like txt2img: it starts from full noise, and the input image is effectively ignored. In empty-latent mode, denoise should be 1.0. The node does not change denoise for you when you flip the toggle - that's on you, and it's the most common "why did my img2img ignore the image" complaint in the entire genre.
Installing it
Same as the rest of the pack - Manager search for "ComfyUI-ImagePlus", or:
cd ComfyUI/custom_nodes
git clone https://github.com/CovertBannana/ComfyUI-ImagePlus.git
Restart ComfyUI. One dependency (aiohttp>=3.9.0), no model downloads. Pair it with the pack's ImagePlus Prompt and Inspector and you get a three-node workflow that goes from "CivitAI reference image" to "sampled latent" with the text-to-image fallback one toggle away.
Should you reach for it?
If you flip between img2img and txt2img a lot - say, you prototype on a reference then switch to pure generation - the toggle genuinely saves you a latent switch node and the mental overhead of two setups. If you only ever do one mode, it's a mildly convenient wrapper with no real downside. Just remember: in image mode, size comes from the image, and denoise below 1.0 is your friend.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| vae | VAE | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| image_in | BOOLEAN | false | — |
| width | INT | 102464–16384 | — |
| height | INT | 102464–16384 | — |
| batch_size | INT | 11–4096 | — |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| denoise | FLOAT | 1.000–1 | — |
| imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |
| vae | VAE | — |