MCPcopy
hub / github.com/OpenBMB/VoxCPM / set_lora_enabled

Method set_lora_enabled

src/voxcpm/core.py:341–347  ·  view source on GitHub ↗

Enable or disable LoRA layers without unloading weights. Args: enabled: If True, LoRA layers are active; if False, only base model is used.

(self, enabled: bool)

Source from the content-addressed store, hash-verified

339 self.tts_model.reset_lora_weights()
340
341 def set_lora_enabled(self, enabled: bool):
342 """Enable or disable LoRA layers without unloading weights.
343
344 Args:
345 enabled: If True, LoRA layers are active; if False, only base model is used.
346 """
347 self.tts_model.set_lora_enabled(enabled)
348
349 def get_lora_state_dict(self) -> dict:
350 """Get current LoRA parameters state dict.

Callers 2

run_inferenceFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by 1

mainFunction · 0.36