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

Function patch_context

diffusers_osinsert/__init__.py:67–73  ·  view source on GitHub ↗

Temporarily enable the patch within a `with` block and restore afterwards.

()

Source from the content-addressed store, hash-verified

65
66@contextmanager
67def patch_context():
68 """Temporarily enable the patch within a `with` block and restore afterwards."""
69 enable_patch()
70 try:
71 yield
72 finally:
73 disable_patch()
74
75
76# Re-export upstream classes for convenience.

Callers 1

Calls 2

enable_patchFunction · 0.85
disable_patchFunction · 0.85

Tested by

no test coverage detected