Skip to content

add fetch node #8265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions comfy_extras/nodes_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from comfy.comfy_types import IO, ComfyNodeABC

class FetchApi(ComfyNodeABC):
@classmethod
def INPUT_TYPES(s):
return {"required": {
"type": (IO.COMBO, {"options": ["input", "output"]}),
"subfolder": (IO.STRING, {}),
"filename": (IO.STRING, {}),
"auto_download": (IO.BOOLEAN, {}),
}}

FUNCTION = "process"
OUTPUT_NODE = True

RETURN_TYPES = ()

CATEGORY = "utils/api"

def process(self, type, subfolder, filename, auto_download, **kwargs):
return {
"ui": {
"result": [type, subfolder, filename]
}
}

NODE_CLASS_MAPPINGS = {
"FetchApi": FetchApi
}

NODE_DISPLAY_NAME_MAPPINGS = {
"FetchApi": "Fetch"
}
1 change: 1 addition & 0 deletions nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,7 @@ def init_builtin_extra_nodes():
"nodes_ace.py",
"nodes_string.py",
"nodes_camera_trajectory.py",
"nodes_api.py",
]

import_failed = []
Expand Down