Spaces:
Sleeping
Sleeping
| 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() | |