From 23a280d7d4317e0fee4d482d5e2357c9b076b560 Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Wed, 16 Sep 2026 08:37:13 +0100 Subject: [PATCH] chore(lora): gate the adaln projection lines behind SD_LORA_DEBUG One line per projected layer is trace output, not a load-time message. --- pipelines/minimax/minimax_lora.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pipelines/minimax/minimax_lora.py b/pipelines/minimax/minimax_lora.py index edbdf2c37..9ea9332a5 100644 --- a/pipelines/minimax/minimax_lora.py +++ b/pipelines/minimax/minimax_lora.py @@ -10,6 +10,7 @@ fused ``attn.qkv_proj`` splits into ``to_q``/``to_k``/``to_v``, and ``mlp.fc1`` lands on the fused SwiGLU projection with its two output halves swapped. """ +import os import re import torch @@ -19,6 +20,9 @@ from modules.lora import native_adapter, network_pdd from modules.video_models.video_minimax import SHIFT_KEYS +debug_log = log.trace if os.environ.get('SD_LORA_DEBUG', None) is not None else lambda *args, **kwargs: None + + # Parallel decoding heads: the audio projection follows the audio schedule, and MiniMaxH3Scheduler counts the terminal sigma in num_inference_steps. PDD = network_pdd.ArchSpec(schedulers={"audio_proj_out": "audio_scheduler"}, steps_for=lambda intervals: intervals + 1, shift_keys=SHIFT_KEYS) @@ -252,7 +256,7 @@ def project_pruned_adaln(sd_module, network_key, w, transformers=None): return None projected = dict(w) projected["lora_down.weight"] = (down.to(dtype=torch.float32, device=basis.device) @ basis.to(dtype=torch.float32).T).to(dtype=down.dtype, device=down.device) - log.debug(f'Network load: type=LoRA arch=minimaxh3 key={network_key} adaln projected {down.shape[1]}->{shape[1]}') + debug_log(f'Network load: type=LoRA arch=minimaxh3 key={network_key} adaln projected {down.shape[1]}->{shape[1]}') return projected