MCPcopy Create free account
hub / github.com/Gadersd/stable-diffusion-burn / save_feed_forward

Function save_feed_forward

python/unet.py:50–57  ·  view source on GitHub ↗
(feed_forward, path)

Source from the content-addressed store, hash-verified

48 save_linear(geglu.proj, os.path.join(path, 'proj'))
49
50def save_feed_forward(feed_forward, path):
51 pathlib.Path(path).mkdir(parents=True, exist_ok=True)
52
53 # Save GEGLU module
54 save_geglu(feed_forward.net[0], os.path.join(path, 'geglu'))
55
56 # Save Linear layer
57 save_linear(feed_forward.net[2], os.path.join(path, 'lin'))
58
59
60def save_basic_transformer_block(basic_transformer_block, path):

Callers 1

Calls 2

save_gegluFunction · 0.85
save_linearFunction · 0.85

Tested by

no test coverage detected