Repository navigation
Expand file tree
/
Copy path__init__.py
More file actions
44 lines (36 loc) · 1.43 KB
/
Copy path__init__.py
File metadata and controls
44 lines (36 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""comfyui-cloud-storage - Generic cloud storage nodes for ComfyUI.
Supports any S3-compatible provider: AWS S3, Backblaze B2, Cloudflare R2,
Wasabi, DigitalOcean Spaces, GCS (S3 interop), and custom endpoints.
"""
from typing_extensions import override
from comfy_api.latest import ComfyExtension, io
class CloudStorageExtension(ComfyExtension):
async def on_load(self) -> None:
try:
import boto3 # noqa: F401
except ImportError:
import logging
logging.warning(
"comfyui-cloud-storage: boto3 not installed. "
"Run: pip install boto3"
)
@override
async def get_node_list(self) -> list[type[io.ComfyNode]]:
from .nodes_profile import CloudStorageProfile
from .nodes_save import SaveImageToCloud, SaveVideoToCloud, SaveAudioToCloud
from .nodes_load import LoadImageFromCloud, LoadAudioFromCloud, LoadModelFromCloud
from .nodes_browse import ListBucket, GeneratePresignedURL, TestCloudConnection
return [
CloudStorageProfile,
SaveImageToCloud,
SaveVideoToCloud,
SaveAudioToCloud,
LoadImageFromCloud,
LoadAudioFromCloud,
LoadModelFromCloud,
ListBucket,
GeneratePresignedURL,
TestCloudConnection,
]
async def comfy_entrypoint() -> CloudStorageExtension:
return CloudStorageExtension()