Major rewrite of DiversityBoost core: - Replace Butterworth LPF with polynomial frequency modulation (smooth continuous curve, token-grid normalized via DiT patch_size) - Add hf_factor, lf_factor, transition parameters for fine control - Add schedule parameter (flat/linear/cosine) for timestep decay - Protect near-DC frequencies (r_norm < 1.0) from dc_preserve to prevent brightness/color shift - Fix DC handling: step 1+ always preserves full DC - Support 5D video latents Rename Core node to V3 (node_id=DiversityBoostCoreV3). Preserve old node as Legacy (node_id=DiversityBoostCore) for backward compatibility. Remove experimental DCW and Smart Patch nodes (superseded by V3). Aggressive defaults tuned for strong diversity: strength=2.0, clamp=0.5, hf=1.0, lf=0.3, trans=2.0, sched=linear
43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
"""ComfyUI-DiversityBoost V3: Restore composition diversity for distilled diffusion models.
|
|
|
|
HF attenuation (polynomial frequency modulation) + DCT composition push at step 0.
|
|
Training-free, single-step, zero model modification.
|
|
"""
|
|
|
|
from comfy_api.latest import ComfyExtension, io
|
|
from .core_node import DiversityBoostCoreV3
|
|
from .core_legacy_node import DiversityBoostCoreLegacy
|
|
|
|
|
|
class DiversityBoostExtension(ComfyExtension):
|
|
"""V3 ComfyExtension providing the DiversityBoost nodes."""
|
|
|
|
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
|
return [DiversityBoostCoreV3, DiversityBoostCoreLegacy]
|
|
|
|
|
|
async def comfy_entrypoint() -> DiversityBoostExtension:
|
|
"""V3 async entry point called by ComfyUI on startup."""
|
|
return DiversityBoostExtension()
|
|
|
|
|
|
# V2 backward compatibility
|
|
NODE_CLASS_MAPPINGS = {
|
|
"DiversityBoostCore": DiversityBoostCoreLegacy,
|
|
"DiversityBoostCoreV3": DiversityBoostCoreV3,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"DiversityBoostCore": "Diversity Boost",
|
|
"DiversityBoostCoreV3": "Diversity Boost (V3)",
|
|
}
|
|
|
|
__all__ = [
|
|
"NODE_CLASS_MAPPINGS",
|
|
"NODE_DISPLAY_NAME_MAPPINGS",
|
|
"DiversityBoostExtension",
|
|
"comfy_entrypoint",
|
|
"DiversityBoostCoreV3",
|
|
"DiversityBoostCoreLegacy",
|
|
]
|