# AODH Pack A set of custom ComfyUI nodes designed to streamline the creation of images for anime and video game characters using structured JSON data. ## Nodes ### Character JSON Reader The **Character JSON Reader** node allows you to load character definitions from JSON files stored in the `characters` directory. It parses the JSON and outputs individual strings for various character attributes, making it easy to build complex prompts. #### Features: - **Automatic File Discovery**: Scans the `nodes/character_reader/characters/` folder for `.json` files. - **Selection Modes**: - `manual`: Select a specific file from the dropdown. - `sequential`: Cycles through files based on the `index` input. - `random`: Picks a random file using the `index` as a seed. - **Structured Outputs**: Provides 21 distinct output pins covering identity, wardrobe, and style. - **Prompt-Ready Formatting**: Automatically appends a comma to every non-empty output string. - **Robustness**: Ensures all outputs are valid strings, even if fields are missing from the JSON. ### Resolution Reader The **Resolution Reader** node reads resolution configurations from text files. Each line in the text file should follow the format: `width, height, upscale`. #### Features: - **Selection Modes**: - `manual`: Uses the first line of the selected file. - `sequential`: Cycles through lines in the file based on the `index` input. - `random`: Picks a random line from the file using the `index` as a seed. - **Outputs**: Provides `width` (INT), `height` (INT), and `upscale` (FLOAT). #### JSON Structure: Place your character JSON files in the `nodes/character_reader/characters/` directory. The expected format is: ```json { "character_id": "unique_id", "identity": { "base_specs": "...", "hair": "...", "eyes": "...", "expression": "...", "hands": "...", "arms": "...", "torso": "...", "pelvis": "...", "legs": "...", "feet": "...", "distinguishing_marks": "..." }, "wardrobe": { "inner_layer": "...", "outer_layer": "...", "lower_body": "...", "footwear": "...", "gloves": "...", "accessories": "..." }, "styles": { "aesthetic": "...", "primary_color": "...", "secondary_color": "...", "tertiary_color": "..." }, "lora":{ "lora_name": "...", "lora_Weight": "...", "lora_triggers": "..." } } ``` ## Installation 1. Clone this repository into your `ComfyUI/custom_nodes/` directory. 2. Add your character JSON files to the `nodes/character_reader/characters/` folder. 3. Add your resolution text files to the `nodes/resolution_reader/resolutions/` folder. 4. Restart ComfyUI. ## Usage Find the node under the `AODH Pack` category in the ComfyUI node menu. Select your character file from the dropdown, and connect the output pins to your prompt encoding nodes.