MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / update_lora_scale

Function update_lora_scale

sat/sgm/modules/diffusionmodules/lora.py:352–362  ·  view source on GitHub ↗
(
    model: nn.Module,
    target_module: Set[str] = None,
    scale: float = 1.0,
)

Source from the content-addressed store, hash-verified

350
351
352def update_lora_scale(
353 model: nn.Module,
354 target_module: Set[str] = None,
355 scale: float = 1.0,
356):
357 for _module, name, _child_module in _find_modules(
358 model, target_module, search_class=[LoRACompatibleLinear, LoRACompatibleConv]
359 ):
360 _child_module.scale = scale
361
362 return

Callers 1

_update_scaleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected