Files
xiaolibai-sys 164896ed78 bump v1.1.4: nvfp4 support, GPU LoRA fold, loader I/O pipeline, async D2H, unified logging
- nvfp4: _quantization_metadata -> comfy_quant synthesis, SlotEntry extra params (block_scale), dual-scale LoRA fold, orig_dtype fixup
- LoRA: plain-mode block LoRAs no longer silently dropped; folded on GPU after weights land
- loader: parallel positioned reads, pipelined group load, no per-tensor clone, header-only dtype probes
- block swap: read_block intra-block parallel + disk_workers node option; async D2H write-back on transfer stream; lazy evict_all skips wasted write-back
- arch: split models/loader.py out of wan_model.py; single utils/keys.py; LoRA folding consolidated in utils/lora.py; global utils/log.py ([BerniniR][Tag] format, BERNINI_LOG_LEVEL)
2026-07-21 14:07:05 +08:00

44 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
"""
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
from .utils.log import get_logger as _get_logger
logger = _get_logger("Init")
logger.info("ComfyUI-BerniniR node package loaded successfully.")
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]