From 8a207df6880c85e2269b4332251e63d1eddb5998 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Thu, 2 Jul 2026 16:41:30 -0700 Subject: [PATCH] Update AGENTS.md --- AGENTS.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e2e67c915..d36988914 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -177,8 +177,11 @@ - Do not use tensors as general-purpose Python data structures. Keep metadata, bookkeeping, counters, flags, shape math, padding math, index planning, memory estimates, and control-flow decisions in plain Python values unless the data - must participate directly in tensor computation. Avoid creating temporary - tensors just to use tensor methods for scalar or structural calculations. + must participate directly in tensor computation. Split points, slice + boundaries, sequence offsets, and similar structural indices should be Python + ints/lists after validation, not CPU tensors kept only to drive Python-side + control flow. Avoid creating temporary tensors just to use tensor methods for + scalar or structural calculations. - Avoid unnecessary casts and transfers. Preserve the intended compute dtype, storage dtype, bias dtype, and original tensor shape metadata. - Keep model-native latent layout handling inside the model or latent-format