MCPcopy Create free account
hub / github.com/bcmi/OSInsert-Image-Composition / disable_patch

Function disable_patch

diffusers_osinsert/__init__.py:53–63  ·  view source on GitHub ↗

Disable the OSInsert FluxFillPipeline patch and restore upstream behavior.

()

Source from the content-addressed store, hash-verified

51
52
53def disable_patch() -> None:
54 """Disable the OSInsert FluxFillPipeline patch and restore upstream behavior."""
55 global _PATCH_ENABLED
56 if not _PATCH_ENABLED:
57 return
58
59 upstream_mod = importlib.import_module("diffusers.pipelines.flux.pipeline_flux_fill")
60 if _ORIG_CALL is not None:
61 upstream_mod.FluxFillPipeline.__call__ = _ORIG_CALL
62
63 _PATCH_ENABLED = False
64
65
66@contextmanager

Callers 1

patch_contextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected