mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-04 08:27:07 +08:00
34 lines
757 B
Python
34 lines
757 B
Python
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"
|
|
}
|