Progress on scaffolding for an EasyCache style implementation of Sortblock

This commit is contained in:
Jedrzej Kosinski
2025-08-31 00:59:01 -07:00
parent e2491f44e8
commit f655fcc5ce
3 changed files with 303 additions and 0 deletions

View File

@@ -128,6 +128,7 @@ class Flux(nn.Module):
blocks_replace = patches_replace.get("dit", {})
for i, block in enumerate(self.double_blocks):
transformer_options["block"] = ("double_block", i)
if ("double_block", i) in blocks_replace:
def block_wrap(args):
out = {}
@@ -169,6 +170,7 @@ class Flux(nn.Module):
img = torch.cat((txt, img), 1)
for i, block in enumerate(self.single_blocks):
transformer_options["block"] = ("single_block", i)
if ("single_block", i) in blocks_replace:
def block_wrap(args):
out = {}