MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / normalize_and_scale

Function normalize_and_scale

wan/utils/multitalk_utils.py:69–76  ·  view source on GitHub ↗
(column, source_range, target_range, epsilon=1e-8)

Source from the content-addressed store, hash-verified

67
68
69def normalize_and_scale(column, source_range, target_range, epsilon=1e-8):
70
71 source_min, source_max = source_range
72 new_min, new_max = target_range
73
74 normalized = (column - source_min) / (source_max - source_min + epsilon)
75 scaled = normalized * (new_max - new_min) + new_min
76 return scaled
77
78
79@torch.compile

Callers 2

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected