π CR Img2Img Process Switch
One Dropdown to Flip Between txt2img and img2img
- txt2img
- img2img
- LATENT
- show_help
If you've built a workflow that can run either as a fresh txt2img generation or as an img2img pass on a loaded image, you've probably hit the annoyance this node solves: you end up manually rewiring the KSampler's latent input every time you want to switch between the two. CR Img2Img Process Switch lets you wire both branches in permanently and flip a single dropdown instead.
How it works. You wire two optional LATENT inputs - txt2img (from something like an EmptyLatentImage) and img2img (from a VAEEncode of a loaded image) - and a required Input selector that picks between them, with txt2img and img2img as the two choices. Whichever one the dropdown is set to gets passed straight through to the single LATENT output. The other branch just sits there unused, still connected, ready the moment you flip the switch back.
Why build the graph this way. The alternative - deleting and re-adding a wire every time you want to test img2img versus a from-scratch generation - is exactly the kind of friction that makes big ComfyUI graphs annoying to iterate on. Wiring both paths in once and switching between them with a dropdown means you can A/B the two approaches on the same prompt and settings without touching the graph structure at all. It's a small node, but it's the kind of thing that saves real time once your workflow has more than a couple of nodes between the latent source and the sampler.
Its siblings. Comfyroll ships a couple of other switches shaped exactly like this one, in the same Utils/Process category: CR Hires Fix Process Switch and CR Batch Process Switch. Same idea, different pair of branches - worth knowing they exist if this pattern is useful to you elsewhere in a workflow.
Inputs and output that matter. Input (required, the txt2img / img2img selector), txt2img and img2img (optional LATENT inputs, one per branch). Output is a single LATENT plus the pack's standard show_help string.
Install. ComfyUI Manager: search "Comfyroll Studio", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, restart. No models needed - pure logic.
Troubleshooting. The obvious trap: if the dropdown is set to img2img but you never actually wired anything into the img2img input, the output has nothing to pass through - both branches are optional inputs, so ComfyUI won't stop you from leaving one empty and selecting it anyway. Double-check both branches are actually connected before you rely on the switch. Beyond that, the usual Comfyroll-wide gotcha: the pack registers all its nodes from one shared file, and real reports on r/comfyui show a single broken import (Failed to load Graphics nodes / Failed to load Utility nodes) taking every Comfyroll node down at once. If nodes vanish after install, redo it with a clean git clone before troubleshooting anything else.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Input | COMBO | 2 options: txt2img, img2img | |
| txt2imgopt | LATENT | β | |
| img2imgopt | LATENT | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |
| show_help | STRING | β |