Root-cause fix for the reported slowdown/wrong-resolution issue: Flux.2 uses
128 channels at 16x spatial downsample (comfy_extras/nodes_flux.py's
EmptyFlux2LatentImage), not 16ch/8x like Flux.1/Krea/Qwen-Image. We hardcoded
//8 for every model, so Flux.2 latents came out 2x too large per axis (4x the
pixels) — explains both the wrong output resolution and the multi-x s/it gap
versus the native node. Replaced the flat channel map with a per-model
(channels, stride) spec, validated against every model in presets.py.
By Axis previously had no model awareness at all — always assumed 4ch/8-stride
regardless of target model, silently wrong for every 16/128-channel model.
Gave it a model input (now last: primary_dim, reference, aspect_ratio,
batch_size, model), wired to the same spec table.
Both nodes now derive their model list/default from presets.py's own order
at module level instead of duplicating it — whichever model is listed first
in presets.py becomes the default everywhere, so a future architecture
doesn't need code changes elsewhere to become the default.
Also: rebuilt nodes.py/__init__.py/web extension from scratch (same node
IDs, same behavior — verified via smoke test) as a clean base for the above;
fixed two Flux.2 presets (1080 -> 1088) that weren't multiples of its
16-stride; added a 512x512 preset to every model for fast local iteration;
documented the By Axis model selector in README.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Both models' native square defaults are heavy (1024/2048), too slow for
quick iteration. 512x512 is stride-valid for both (8x and 16x respectively).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
model now goes last (primary_dim, reference, aspect_ratio, batch_size,
model). Both nodes derive MODELS from presets.py's own order once at
module level, so whichever model is listed first there becomes the
default everywhere — no per-node edits needed when a new architecture
takes the top spot.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Stable revert point — all known correctness/perf issues (latent channel
count per model, device placement) are fixed as of this commit. If a
future rebuild goes wrong, `git reset --hard 579e130` (or this amended SHA)
returns to a known-good working state.
CPU-resident latents forced per-step CPU<->GPU transfers during sampling,
causing several-x slower s/it than the native EmptyLatentImage node even
at matching resolution/channels.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- presets.py/nodes.py: reorder model dropdown Krea > Flux.2 > Qwen-Image >
Flux.1 > SDXL > SD15 to match current usage; drop HiDream (faded 2026
relevance) from presets and LATENT_CHANNELS.
- README.md: sync supported-model list with presets.py.
- publish_action.yml: apply Comfy-Org's reviewer feedback — explicit
issues:write permission (least-privilege + publish-status reporting),
owner-gated job (fork safety), pin publish-node-action to @v1 instead of
the mutable @main branch.
- Bump version to 1.0.9.
- EmptyLatentAspectPreset gains a "model" widget; web/aspect_ratio_filter.js
filters the "preset" combo to that model client-side, parsed from each
preset's label so presets.py stays the single source of truth.
- Fix latent channel count: SD1.5/SDXL use 4-channel latents, but
Flux/HiDream/Krea/Qwen-Image use 16-channel latents (same family as
ComfyUI's EmptySD3LatentImage) — was previously hardcoded to 4 for all
models, breaking/corrupting generations on the newer models.
- Drop Ideogram and ERNIE from presets.py: both are hosted API models with
no local LATENT/diffusion pipeline in ComfyUI, so listing them implied
false compatibility.
Build PRESET_MAP/RATIO_MAP once at class level instead of rebuilding on
every INPUT_TYPES/generate call. README now lists the actual supported
model families (Flux.1/2, Krea, Qwen-Image, Ideogram 4.0, ERNIE) in place
of the stale Chroma/Flux mention.
Registry publish failed: repo was already registered under node ID
comfyui-aspect-ratio-presets, but pyproject.toml name field was
aspect-ratio-presets, causing a duplicate-node conflict.
Replace outdated preset list with current-gen model resolutions (Flux.1/2,
Krea, Qwen-Image, Ideogram 4.0, Ernie) grouped logically by family and
aspect ratio. Update registry DisplayName to "ComfyUI Aspect Ratio Presets".
Add .comfyignore per Comfy Registry publishing docs and gitignore
Claude/Serena tooling state.
The node class mappings were renamed to concise labels (“CAS Empty Latent Aspect Ratio Preset” and “CAS Empty Latent Aspect Ratio Axis”) to make them appear shorter and clearer in the ComfyUI interface
The code was updated to include the generated width and height as additional outputs alongside the latent tensor for both the aspect ratio preset and axis-based latent nodes, while preserving the original return format ({"samples": latent}) for compatibility. Additionally, the node class mappings were renamed to concise labels (“CAS Empty Latent Aspect Ratio Preset” and “CAS Empty Latent Aspect Ratio Axis”) to make them appear shorter and clearer in the ComfyUI interface. These improvements provide users with immediate access to the selected or calculated dimensions in their workflows and make the nodes easier to identify in the node menu.
Renamed the nodes with CAS, Custom ASpect Ratio
Changed the preset string format to:
912x512 16:9 Landscape - SD15
512x768 2:3 Portrait - SD15
1024x1024 1:1 Square - SDXL
…