OpenCV pyrUp_1
An identical twin that needs no intro
- src
- dst
- nparray
pyrUp_1 is the same node as pyrUp_0. Same function call, same inputs, same 2× upsampled output. OpenCV's Python stubs list two overloads of pyrUp; this pack generates one node per overload, and in this case the two came out identical. So if you already read the pyrUp_0 page, you've read this one. Drag either into your workflow and nothing changes.
For anyone landing here directly: this is OpenCV's pyramid upsampler. It doubles both dimensions by interpolating each output pixel from a 5×5 neighborhood of the input. Smooth, fast, free - but it's interpolation, not super-resolution. Use it to enlarge a small image before a controlnet preprocessor or a compositing step, or to match branch resolutions before you merge them. It's the wrong tool if your actual goal is "add detail" - that needs a real upscale model (ESRGAN-style), which costs VRAM and time but actually invents the texture you want.
What to set
src-NPARRAY, BGR afterImage2Nparray.dstsize- a string literal parsed byast.literal_eval.(0, 0)= default = exactly 2×. That's what you want.borderType- int, use4(BORDER_DEFAULT). OpenCV only really accepts the default for this operation; other values can trigger a runtime assertion.dst- optional out-parameter, leave unplugged (the README's standing advice).
Output is a single nparray, 2× the size, BGR, so it goes through Nparrays2Image back to a Comfy IMAGE. Remember batch_size==1 only.
Install
No models, no downloads. The pack is auto-generated wrappers around OpenCV:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-contrib-python
Or search "OpenCV" in ComfyUI Manager and restart - you'll find it under image/OpenCV. The one install headache worth knowing: a Cannot import name 'guidedFilter' from 'cv2.ximgproc' error at load means your OpenCV installs are fighting each other; the README links the fix.
There's a subtle point hidden in the duplicate: this pack is auto-generated from OpenCV's type stubs, so dozens of its nodes come in numbered twins that are sometimes identical (pyrUp_0/_1) and sometimes subtly different overloads (look at recoverPose). Always glance at the inputs before assuming twins are the same - here they are, so pyrUp_0 and pyrUp_1 are interchangeable. Take either.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| dstsize | STRING | — | |
| borderType | INT | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |