MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / apply_FRESCO_opt

Function apply_FRESCO_opt

diffusers/examples/community/fresco_v2v.py:736–753  ·  view source on GitHub ↗

Apply FRESCO-based optimization to a StableDiffusionPipeline

(
    pipe,
    steps=[],
    layers=[0, 1, 2, 3],
    flows=None,
    occs=None,
    correlation_matrix=[],
    intra_weight=1e2,
    iters=20,
    optimize_temporal=True,
    saliency=None,
)

Source from the content-addressed store, hash-verified

734
735
736def apply_FRESCO_opt(
737 pipe,
738 steps=[],
739 layers=[0, 1, 2, 3],
740 flows=None,
741 occs=None,
742 correlation_matrix=[],
743 intra_weight=1e2,
744 iters=20,
745 optimize_temporal=True,
746 saliency=None,
747):
748 """
749 Apply FRESCO-based optimization to a StableDiffusionPipeline
750 """
751 pipe.unet.forward = my_forward(
752 pipe.unet, steps, layers, flows, occs, correlation_matrix, intra_weight, iters, optimize_temporal, saliency
753 )
754
755
756@torch.no_grad()

Callers 2

get_intraframe_parasFunction · 0.85
__call__Method · 0.85

Calls 1

my_forwardFunction · 0.85

Tested by

no test coverage detected