From 9da452f03960dab2eb9313eb80fa49dfe80b7985 Mon Sep 17 00:00:00 2001 From: RITIK Date: Wed, 26 Nov 2025 13:34:11 +0530 Subject: [PATCH] Restructure to nodes/ layout like Floyo Seed API --- README.md | 6 ++++++ __init__.py | 2 +- nodes/__init__.py | 0 flux2_config.py => nodes/flux2_config.py | 3 ++- flux2_node.py => nodes/flux2_node.py | 0 flux2_utils.py => nodes/flux2_utils.py | 0 6 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 nodes/__init__.py rename flux2_config.py => nodes/flux2_config.py (91%) rename flux2_node.py => nodes/flux2_node.py (100%) rename flux2_utils.py => nodes/flux2_utils.py (100%) diff --git a/README.md b/README.md index 79ac3f8..ca5f9f0 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@ Custom ComfyUI node for Floyo that wraps the Black Forest Labs FLUX.2 **[pro]** - Built-in polling with basic error handling and timeouts. ## Installation +Repo layout (mirrors Floyo Seed API style): +- `nodes/` → node code and helpers +- `config.ini` → API key placeholder +- `requirements.txt` +- `README.md`, `__init__.py` + 1. Place this repository folder (e.g., `Flux2-Pro`) into `ComfyUI/custom_nodes/`. 2. Install dependencies: ```bash diff --git a/__init__.py b/__init__.py index a236b77..37f8129 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,4 @@ -from .flux2_node import ( +from .nodes.flux2_node import ( # noqa: F401 Flux2ProImageEdit, Flux2ProTextToImage, NODE_CLASS_MAPPINGS, diff --git a/nodes/__init__.py b/nodes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/flux2_config.py b/nodes/flux2_config.py similarity index 91% rename from flux2_config.py rename to nodes/flux2_config.py index d141d63..6bf443d 100644 --- a/flux2_config.py +++ b/nodes/flux2_config.py @@ -15,7 +15,8 @@ class Flux2Config: def _initialize(self): current_dir = os.path.dirname(os.path.abspath(__file__)) - config_path = os.path.join(current_dir, "config.ini") + # Config lives at repo root (parent of nodes/) + config_path = os.path.join(os.path.dirname(current_dir), "config.ini") config = configparser.ConfigParser() config.read(config_path) diff --git a/flux2_node.py b/nodes/flux2_node.py similarity index 100% rename from flux2_node.py rename to nodes/flux2_node.py diff --git a/flux2_utils.py b/nodes/flux2_utils.py similarity index 100% rename from flux2_utils.py rename to nodes/flux2_utils.py