Skip to content

Commit d1d53c1

Browse files
Revert "feat: Add CacheProvider API for external distributed caching (Comfy-Org#12056)" (Comfy-Org#12912)
This reverts commit af7b4a9.
1 parent af7b4a9 commit d1d53c1

File tree

7 files changed

+83
-859
lines changed

7 files changed

+83
-859
lines changed

comfy_api/latest/__init__.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def __init__(self):
2525
super().__init__()
2626
self.node_replacement = self.NodeReplacement()
2727
self.execution = self.Execution()
28-
self.caching = self.Caching()
2928

3029
class NodeReplacement(ProxiedSingleton):
3130
async def register(self, node_replace: io.NodeReplace) -> None:
@@ -85,36 +84,6 @@ async def set_progress(
8584
image=to_display,
8685
)
8786

88-
class Caching(ProxiedSingleton):
89-
"""
90-
External cache provider API for sharing cached node outputs
91-
across ComfyUI instances.
92-
93-
Example::
94-
95-
from comfy_api.latest import Caching
96-
97-
class MyCacheProvider(Caching.CacheProvider):
98-
async def on_lookup(self, context):
99-
... # check external storage
100-
101-
async def on_store(self, context, value):
102-
... # store to external storage
103-
104-
Caching.register_provider(MyCacheProvider())
105-
"""
106-
from ._caching import CacheProvider, CacheContext, CacheValue
107-
108-
async def register_provider(self, provider: "ComfyAPI_latest.Caching.CacheProvider") -> None:
109-
"""Register an external cache provider. Providers are called in registration order."""
110-
from comfy_execution.cache_provider import register_cache_provider
111-
register_cache_provider(provider)
112-
113-
async def unregister_provider(self, provider: "ComfyAPI_latest.Caching.CacheProvider") -> None:
114-
"""Unregister a previously registered cache provider."""
115-
from comfy_execution.cache_provider import unregister_cache_provider
116-
unregister_cache_provider(provider)
117-
11887
class ComfyExtension(ABC):
11988
async def on_load(self) -> None:
12089
"""
@@ -147,9 +116,6 @@ class Types:
147116
VOXEL = VOXEL
148117
File3D = File3D
149118

150-
151-
Caching = ComfyAPI_latest.Caching
152-
153119
ComfyAPI = ComfyAPI_latest
154120

155121
# Create a synchronous version of the API
@@ -169,7 +135,6 @@ class Types:
169135
"Input",
170136
"InputImpl",
171137
"Types",
172-
"Caching",
173138
"ComfyExtension",
174139
"io",
175140
"IO",

comfy_api/latest/_caching.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

comfy_execution/cache_provider.py

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)