quadtree_density used a count-percentile threshold that guaranteed a fixed hot fraction on any canvas, saturating scores to 1.0 regardless of content. Redesigned around a value threshold interpolated across the canvas's own p05-p95 block energy range, normalized to p95 tile coverage. Validated against real VAE latents: healthy 0-1 spread, stable across split_percentile 0.3-0.8. Also fixes: seed+tile_idx overflow past torch's 64-bit seed range, identical noise across tiles in the advanced node (NOISE objects reuse a single stored seed), unfeathered seams when the clamped last tile's overlap exceeds the configured overlap, avg_pool2d crash on tiny latents, dropped noise_mask/batch_index in output latents, and an overly-broad pytest import guard in __init__.py. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
"""
|
|
LLM-Tile - Generate tiled compositions based on LLM-generated prompts
|
|
"""
|
|
|
|
import sys
|
|
|
|
try:
|
|
from .node import NODE_CLASS_MAPPINGS as TILE_NCM, NODE_DISPLAY_NAME_MAPPINGS as TILE_NDCM
|
|
from .node_advanced import NODE_CLASS_MAPPINGS as ADV_NCM, NODE_DISPLAY_NAME_MAPPINGS as ADV_NDCM
|
|
from .node_detailer_adaptive import NODE_CLASS_MAPPINGS as ADET_NCM, NODE_DISPLAY_NAME_MAPPINGS as ADET_NDCM
|
|
|
|
NODE_CLASS_MAPPINGS = {**TILE_NCM, **ADV_NCM, **ADET_NCM}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {**TILE_NDCM, **ADV_NDCM, **ADET_NDCM}
|
|
except ImportError:
|
|
# Under pytest the modules are imported directly (no ComfyUI package
|
|
# context), so the relative imports fail — that's fine for tests. In a
|
|
# real ComfyUI process an import failure is a genuine error and must
|
|
# surface, even if pytest happens to be loaded in the same process
|
|
# (the old `'pytest' in sys.modules` guard silently unregistered the
|
|
# whole pack in that case).
|
|
if 'pytest' not in sys.modules:
|
|
raise
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|
|
|
|
__version__ = "0.4.0"
|