Ground-up rewrite of nodes.py/__init__.py/web extension, keeping node IDs, model order, and presets.py unchanged for backward compatibility. Found the real bug while rebuilding: Flux.2 uses 128 channels at 16x spatial downsample (comfy_extras/nodes_flux.py EmptyFlux2LatentImage), not 16ch/8x like Flux.1/Krea/Qwen-Image. We hardcoded //8 everywhere, producing a latent 2x too large per axis for Flux.2 (4x the pixels) — explains both the wrong output resolution and the outsized s/it gap vs the native node. By Axis node previously had no model awareness at all, always assuming 4ch/8-stride (SD1.5-style) regardless of target model — silently wrong for every 16/128-channel model. Added a model input so it uses the correct per-model latent spec too. Also fixed two Flux.2 presets (1080 -> 1088) that weren't multiples of its 16-stride requirement. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
12 lines
376 B
Python
12 lines
376 B
Python
from .nodes import EmptyLatentAspectByAxis, EmptyLatentAspectPreset
|
|
|
|
# Node IDs are referenced by users' saved workflows — never rename.
|
|
NODE_CLASS_MAPPINGS = {
|
|
"CAS Empty Latent Aspect Ratio Preset": EmptyLatentAspectPreset,
|
|
"CAS Empty Latent Aspect Ratio Axis": EmptyLatentAspectByAxis,
|
|
}
|
|
|
|
WEB_DIRECTORY = "web"
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "WEB_DIRECTORY"]
|