ComfyUI Extension: ComfyUI VAE Reflection
A simple custom node to use reflect padding mode in the conv layers of VAEs.
Custom Nodes (0)
README
ComfyUI VAE Reflection
A simple custom node and SwarmUI extension that modifies the padding mode of the conv layers of the VAE to use reflect mode. This is used to fix artifacts in the edges of the images that use a VAE trained with reflect padding.
<br/>
Warning: If the VAE in use wasn't trained with reflect padding the reflection mode can cause issues in the edges.
<br/>
<br/>
Here's a side to side comparison, if you can't see the difference try to zoom in the bottom left corner of both images and compare them.
Tested with Anzhc's EQ VAE
Installation as custom node
Download it using the ComfyUI Registry.
Manual Install
Clone the repository into the Comfy's custom_nodes
directory with this command:
git clone https://github.com/Jelosus2/comfyui-vae-reflection
and restart ComfyUI.
You can integrate this node in your workflow very easily like shown in the picture below.
Installation as SwarmUI extension
- Update SwarmUI to the latest version.
- If running, shutdown SwarmUI.
- Open a terminal in
SwarmUI/src/Extensions
. - Clone the repository with
git clone https://github.com/Jelosus2/comfyui-vae-reflection
. - Run
launch-windows-dev.ps1
orlaunch-linux-dev.sh
to recompile SwarmUI. Once it's done you can shutdown the dev version. - Launch SwarmUI and wait for the backend to finish loading.
- Search for the VAE Reflection category in the paramaters list, if you don't see it you need to display the advanced options.
Updating
- Update SwarmUI to the latest version.
- Go to Server -> Extensions tab.
- Click the Update button for the VAE Reflection extension.
To use the extension you only need to check the checkbox of the Enable VAE Reflection
parameter.
License
MIT License
Copyright (c) 2025 Jelosus1
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.