ChronicleNext / comfy /fetch_comfy_info.py
topguy's picture
refactor: modularize codebase and reorganize utilities
467c85e
Raw
History Blame Contribute Delete
1.02 kB
import requests
import json
COMFY_URL = "http://127.0.0.1:8188"
def fetch_info():
print(f"Fetching node info from {COMFY_URL}/object_info...")
try:
response = requests.get(f"{COMFY_URL}/object_info", timeout=10)
if response.status_code == 200:
info = response.json()
# Save a summary of available nodes to a file
with open("comfy_node_info.json", "w") as f:
json.dump(info, f, indent=2)
print(f"Successfully fetched info for {len(info)} nodes. Saved to comfy_node_info.json")
# Check for common nodes
search_nodes = ["CLIPTextEncode", "CheckpointLoaderSimple", "KSampler", "VAEDecode"]
found = [n for n in search_nodes if n in info]
print(f"Found standard nodes: {found}")
else:
print(f"Failed to fetch info: {response.status_code}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
fetch_info()