Ernie Resolution
(ComfyUI)
Utility node for Baidu ERNIE-Image with preset recommended resolutions. https://huggingface.co/baidu/ERNIE-Image
Select a resolution and get ready-to-use latent, along with width and height outputs.
Includes official aspect ratios for optimal quality and stability.
Installation:
Place the Ernie Resolution.py file into your ComfyUI/custom_nodes/ folder and restart ComfyUI.
Description
## What's Updated
Fixed the "Latent size wrong" error.
The node was previously using a scaling factor of 8 (standard SD), but the Ernie model architecture requires a scaling factor of 16.
### Changes:
* Corrected Latent Dimensions: Updated the calculation logic from // 8 to // 16.
* Verified Resolutions: All official resolutions (e.g., 848x1264, 1024x1024) now generate the correct latent tensor size.
If you encountered the "2 times the size it should have be" error, please re-download this file. It should work perfectly now!

