Skip to content

Commit a7b5432

Browse files
Merge pull request #200 from runpod-workers/chore/agents-md
chore: replace CLAUDE.md with AGENTS.md
2 parents e09ecc2 + fc07063 commit a7b5432

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Do not edit or remove this section -->
2+
<!-- This document exists for non-obvious, error-prone shortcomings in the codebase, the model, or the tooling that an agent cannot figure out by reading the code alone. No architecture overviews, file trees, build commands, or standard behavior. When you encounter something that belongs here, first consider whether a code change could eliminate it and suggest that to the user. Only document it here if it can't be reasonably fixed. -->
3+
4+
---
5+
6+
## Non-obvious constraints
7+
8+
- **No hot-reload**: handler.py, start.sh, and network_volume.py are `ADD`ed into the Docker image at build time (to `/`). Any change requires a full `docker build` before testing with docker-compose.
9+
- **Platform mismatch**: Always build with `--platform linux/amd64` for Runpod deployment. Omitting this on ARM hosts (Apple Silicon) produces images that silently fail on Runpod.
10+
- **No linter or formatter configured**: Follow PEP 8 by convention; there are no pre-commit hooks or CI lint checks.
11+
- **ComfyUI-Manager forced offline**: `start.sh` calls `comfy-manager-set-mode offline` on every boot. Custom nodes cannot be installed at runtime through the Manager UI — they must be baked into the Docker image.
12+
- **Network volume mount point**: Models on a network volume must match the directory structure in `src/extra_model_paths.yaml`. The volume is expected at `/runpod-volume` with a `comfyui/models/` subtree.
13+
14+
## Model type detection (for workflow parsing)
15+
16+
Node types map to model directories — this is ComfyUI domain knowledge not encoded in handler code:
17+
18+
- `UpscaleModelLoader``upscale_models`
19+
- `VAELoader``vae`
20+
- `UNETLoader`, `UnetLoaderGGUF`, `Hy3DModelLoader``diffusion_models`
21+
- `DualCLIPLoader`, `TripleCLIPLoader``text_encoders`
22+
- `LoraLoader``loras`
23+
24+
## Custom node compatibility
25+
26+
Some custom nodes have dependency conflicts that only surface at runtime:
27+
28+
- **ComfyUI-BrushNet**: Requires `diffusers>=0.29.0`, `accelerate>=0.29.0,<0.32.0`, and `peft>=0.7.0`. Without these exact ranges, you get silent import errors.
29+
- **General pattern**: When a custom node fails with import errors, check its dependency chain and pin versions in the Dockerfile with `uv pip install`.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

0 commit comments

Comments
 (0)