MCPcopy Index your code
hub / github.com/huggingface/diffusers / swap_scale_shift

Function swap_scale_shift

scripts/convert_aura_flow_to_diffusers.py:25–28  ·  view source on GitHub ↗
(weight, dim)

Source from the content-addressed store, hash-verified

23
24# similar to SD3 but only for the last norm layer
25def swap_scale_shift(weight, dim):
26 shift, scale = weight.chunk(2, dim=0)
27 new_weight = torch.cat([scale, shift], dim=0)
28 return new_weight
29
30
31def convert_transformer(state_dict):

Callers 1

convert_transformerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…