# jgrfw/comfyui-aicg3d architecture

> Architecture diagram of the GitHub repository jgrfw/comfyui-aicg3d, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jgrfw/comfyui-aicg3d
- Repository: https://github.com/jgrfw/comfyui-aicg3d

## Overview

ComfyUI-AICG3D-Integrated is a ComfyUI plugin for MiniMax H3 video creation. The principal workflow is to enter a script, split it into timed segments, configure H3 generation nodes with prompts and reference media, then sample and upscale video latents. Alongside that workflow, the plugin provides prompt optimization, media and prompt-resource browsing, and specialized H3 audio/video conditioning. The graph reflects README capabilities and the supplied source excerpts; some subsystem links are based on documented functionality because the corresponding implementation was not sampled.

Main entry points: [`h3easy/nodes.py`](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/nodes.py) (H3 Generation Nodes), [`aicg3d/routes.py`](https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/routes.py) (Resource API), [`h3goohai/nodes.py`](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3goohai/nodes.py) (H3 AV Nodes), [`web/aicg3d-core.js`](https://github.com/jgrfw/comfyui-aicg3d/blob/main/web/aicg3d-core.js) (Shared Web UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Workflow and Nodes"]
  node_registry["Node Registration<br/>[registry.py]"]
  node_prompt_split["Script Splitter<br/>[prompt_split.py]"]
  node_h3_nodes["H3 Generation Nodes<br/>[nodes.py]"]
  node_gh_nodes["H3 AV Nodes<br/>[nodes.py]"]
  node_prompt_optimizer["Prompt Optimizer"]
end

subgraph group_render["Sampling and Rendering"]
  node_strategies["Sampling Strategies"]
  node_acceleration["Sampling Acceleration<br/>[accel.py]"]
  node_upscaler["Latent Upscaler"]
end

subgraph group_resources["Prompt and Media Resources"]
  node_prompt_guides["Prompt Guides"]
  node_skills["Creative Skills"]
  node_presets["Prompt Presets"]
  node_media_library["Media Library<br/>[routes.py]"]
end

subgraph group_interface["ComfyUI Interface"]
  node_routes["Resource API<br/>[routes.py]"]
  node_web_core["Shared Web UI<br/>[aicg3d-core.js]"]
  node_h3_ui["H3 Node UI"]
  node_gh_ui["AV Node UI"]
end

node_creator(("Creator"))
node_comfyui["ComfyUI"]
node_h3_runtime["H3 Model Runtime"]
node_providers["Optimizer Providers"]

node_creator -->|"build workflow"| node_comfyui
node_comfyui -->|"loads nodes"| node_registry
node_creator -->|"submit script"| node_prompt_split
node_prompt_split -->|"map segments"| node_h3_nodes
node_creator -->|"configure generation"| node_h3_nodes
node_creator -->|"configure AV"| node_gh_nodes
node_gh_nodes -->|"optimize prompt"| node_prompt_optimizer
node_prompt_optimizer -.->|"request optimization"| node_providers
node_h3_nodes -->|"sample generation"| node_h3_runtime
node_gh_nodes -->|"condition generation"| node_h3_runtime
node_h3_nodes -->|"apply strategy"| node_strategies
node_h3_nodes -->|"configure acceleration"| node_acceleration
node_h3_nodes -->|"upscale latents"| node_upscaler
node_web_core -->|"fetch resources"| node_routes
node_routes -->|"read skills"| node_skills
node_routes -->|"read presets"| node_presets
node_routes -->|"read guides"| node_prompt_guides
node_routes -->|"list media"| node_media_library
node_h3_ui -->|"use shared UI"| node_web_core
node_gh_ui -->|"use shared UI"| node_web_core

click node_registry "https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/registry.py"
click node_prompt_split "https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/prompt_split.py"
click node_h3_nodes "https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/nodes.py"
click node_gh_nodes "https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3goohai/nodes.py"
click node_prompt_optimizer "https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3goohai/prompt_optimizer.py"
click node_strategies "https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/sampling_strategies.py"
click node_acceleration "https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/accel.py"
click node_upscaler "https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/h3_latent_upscaler.py"
click node_prompt_guides "https://github.com/jgrfw/comfyui-aicg3d/tree/main/prompt_guides"
click node_skills "https://github.com/jgrfw/comfyui-aicg3d/tree/main/skills"
click node_presets "https://github.com/jgrfw/comfyui-aicg3d/tree/main/prompt_presets"
click node_routes "https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/routes.py"
click node_web_core "https://github.com/jgrfw/comfyui-aicg3d/blob/main/web/aicg3d-core.js"
click node_h3_ui "https://github.com/jgrfw/comfyui-aicg3d/blob/main/web/minimax_h3_easy_ui.js"
click node_gh_ui "https://github.com/jgrfw/comfyui-aicg3d/blob/main/web/minimax_h3_integration.js"
click node_media_library "https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/routes.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_registry,node_prompt_split,node_h3_nodes,node_gh_nodes,node_prompt_optimizer,node_comfyui toneBlue
class node_strategies,node_acceleration,node_upscaler toneAmber
class node_prompt_guides,node_skills,node_presets,node_media_library toneMint
class node_routes,node_web_core,node_h3_ui,node_gh_ui toneRose
class node_creator,node_h3_runtime,node_providers toneIndigo
```

## Components

### Workflow and Nodes

- [Node Registration](https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/registry.py): `aicg3d/registry.py`
- [Script Splitter](https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/prompt_split.py): `aicg3d/prompt_split.py`
- [H3 Generation Nodes](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/nodes.py): `h3easy/nodes.py`
- [H3 AV Nodes](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3goohai/nodes.py): `h3goohai/nodes.py`
- [Prompt Optimizer](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3goohai/prompt_optimizer.py): `h3goohai/prompt_optimizer.py`

### Sampling and Rendering

- [Sampling Strategies](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/sampling_strategies.py): `h3easy/sampling_strategies.py`
- [Sampling Acceleration](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/accel.py): `h3easy/accel.py`
- [Latent Upscaler](https://github.com/jgrfw/comfyui-aicg3d/blob/main/h3easy/h3_latent_upscaler.py): `h3easy/h3_latent_upscaler.py`

### Prompt and Media Resources

- [Prompt Guides](https://github.com/jgrfw/comfyui-aicg3d/tree/main/prompt_guides): `prompt_guides`
- [Creative Skills](https://github.com/jgrfw/comfyui-aicg3d/tree/main/skills): `skills`
- [Prompt Presets](https://github.com/jgrfw/comfyui-aicg3d/tree/main/prompt_presets): `prompt_presets`
- [Media Library](https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/routes.py): `aicg3d/routes.py`

### ComfyUI Interface

- [Resource API](https://github.com/jgrfw/comfyui-aicg3d/blob/main/aicg3d/routes.py): `aicg3d/routes.py`
- [Shared Web UI](https://github.com/jgrfw/comfyui-aicg3d/blob/main/web/aicg3d-core.js): `web/aicg3d-core.js`
- [H3 Node UI](https://github.com/jgrfw/comfyui-aicg3d/blob/main/web/minimax_h3_easy_ui.js): `web/minimax_h3_easy_ui.js`
- [AV Node UI](https://github.com/jgrfw/comfyui-aicg3d/blob/main/web/minimax_h3_integration.js): `web/minimax_h3_integration.js`

### Other components

- **Creator**
- **ComfyUI**
- **H3 Model Runtime**
- **Optimizer Providers**

## Connections

- Creator → ComfyUI: build workflow
- ComfyUI → Node Registration: loads nodes
- Creator → Script Splitter: submit script
- Script Splitter → H3 Generation Nodes: map segments
- Creator → H3 Generation Nodes: configure generation
- Creator → H3 AV Nodes: configure AV
- H3 AV Nodes → Prompt Optimizer: optimize prompt
- Prompt Optimizer → Optimizer Providers: request optimization
- H3 Generation Nodes → H3 Model Runtime: sample generation
- H3 AV Nodes → H3 Model Runtime: condition generation
- H3 Generation Nodes → Sampling Strategies: apply strategy
- H3 Generation Nodes → Sampling Acceleration: configure acceleration
- H3 Generation Nodes → Latent Upscaler: upscale latents
- Shared Web UI → Resource API: fetch resources
- Resource API → Creative Skills: read skills
- Resource API → Prompt Presets: read presets
- Resource API → Prompt Guides: read guides
- Resource API → Media Library: list media
- H3 Node UI → Shared Web UI: use shared UI
- AV Node UI → Shared Web UI: use shared UI
