MCPcopy
hub / github.com/Yuanshi9815/OminiControl / _stash

Function _stash

omini/pipeline/flux_omini.py:819–823  ·  view source on GitHub ↗
(canvas, tokens, ids, H, W)

Source from the content-addressed store, hash-verified

817
818 # Stash the latents and the complement condition
819 def _stash(canvas, tokens, ids, H, W) -> None:
820 B, T, C = tokens.shape
821 ids = ids.to(torch.long)
822 flat_idx = (ids[:, 1] * W + ids[:, 2]).to(torch.long)
823 canvas.view(B, -1, C).index_copy_(1, flat_idx, tokens)
824
825 _stash(canvas, latents, latent_image_ids, H, W)
826 _stash(canvas, comp_latent, comp_ids, H, W)

Callers 1

generateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected