Files
xiaolibai-sys-ComfyUI-Berni…/__init__.py
T
xiaolibai-sys a177ad5dbc v1.0.3: fix FreeNoise double/zero-apply, TeaCache+compile guard, isolated compile cache, stale-comment cleanup
- FreeNoise: applied exactly once on the single-sampler path; now also applied on the dual-expert path (was zero)
- TeaCache: restores eager transformer_forward when the model is torch.compiled, so block-skipping actually engages (previously silent no-op)
- Compile cache: isolated to %TEMP%/bernini_r_inductor_cache (env-overridable), version-gated purge + manual purge via BerniniR_CompileModel.purge_cache / BERNINI_PURGE_COMPILE_CACHE
- Removed web/guidance_ui.js frontend (guidance moved to the BerniniR_GuidanceConfig node); dropped WEB_DIRECTORY export
- Stale-comment cleanup across nodes/ and utils/; refreshed README and added README_DEVELOPER
- Bump version to 1.0.3
2026-07-15 11:08:43 +08:00

43 lines
2.1 KiB
Python

"""ComfyUI-BerniniR: Custom node package for the Bernini-R 1.3B/14B video model.
Features:
- Model loading with separate LoRA-aware torch.compile node
- Temporal context window tiling for long video generation
- Enhanced KSampler with native context window support
- Seven-mode guidance family: CFG, APG, RAAG, S2, Z2, STG_A, STG_R
- Prompt embedding with task presets, system prompts, and CLIP caching
- In-context conditioning for video editing
- Five attention backends: SageAttention 3, SageAttention, FlashAttention, xFormers, SDPA
- TeaCache acceleration and GPU<->CPU block swap
Registered nodes (19):
BerniniR_ModelLoader — Load diffusion model
BerniniR_CompileModel — Apply torch.compile after LoRA loading
BerniniR_CLIPLoader — Load Wan text encoder
BerniniR_VAELoader — Load Bernini-R VAE
BerniniR_Conditioning — Create latents + attach in-context references
BerniniR_KSampler — Enhanced sampler with context window support
BerniniR_TeaCacheArgs — TeaCache block-skipping args
BerniniR_ContextWindow — Configure temporal context windows
BerniniR_PromptEmbedding — Task-aware prompt embedding & CLIP encoding
BerniniR_VAEDecode — VAE decode with color matching
BerniniR_VAEEncode — VAE encode with tiling
BerniniR_ApplyNAG — Normalized Attention Guidance for detail enhancement
BerniniR_GuidanceStrengthSchedule — Per-step guidance scale curve
BerniniR_DualExpertSampler — High/low-noise model switching per step
BerniniR_BlockSwapArgs — Configure GPU<->CPU block swapping
BerniniR_GuidanceConfig — Select guidance mode & parameters
BerniniR_SegmentSchedule — Per-segment schedule
BerniniR_LoadLoRA — Append LoRA spec (inline merge)
BerniniR_AttentionConfig — Select attention backend
"""
import logging
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
logger = logging.getLogger(__name__)
logger.info("[BerniniR] ComfyUI-BerniniR node package loaded successfully.")
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]