[Issue 101][eval-and-fix] Fix VideoAutoencoderKL.forward return contract (closes pollockjj/mydevelopment#190)#41
Conversation
…AutoencoderKL.forward (closes pollockjj/mydevelopment#190) VideoAutoencoderKL.forward dereferenced .latent_dist and .sample on encode()/decode_() returns and called self.decode (no underscore) on a class that only defines decode_. Direct module invocation via forward(x, mode=...) raised AttributeError on every path. encode() / decode_() return a tensor when return_dict=True (the call site default) and a one-element tuple when return_dict=False. The fix unwraps that optional tuple shape and routes mode="decode" / mode="all" through self.decode_ (with the trailing underscore) so the actual contract is honored without changing either method signature. Regression test tests-unit/comfy_test/seedvr_vae_forward_test.py exercises forward() for mode="encode", "decode", and "all" against a stub subclass that bypasses the heavy __init__, plus an inspect.getsource assertion that no .latent_dist, no .sample, and no self.decode( call survive in the post-fix forward body. Source: CodeRabbit thread on Comfy-Org#11294 Comfy-Org#11294 (comment)
Restore **kwargs on VideoAutoencoderKL.forward so direct callers using vae(x, mode=..., return_dict=False) continue to work, and forward kwargs consistently to encode()/decode_() so return_dict's tuple-return shape is honored end-to-end instead of silently discarded. For mode="all" the internal encode runs with the default return_dict=True (the only shape decode_ accepts as input); kwargs reach only the terminal decode_, which controls the final return shape. This asymmetry preserves the encode->decode_ composition while honoring the caller's requested final shape. Test changes: drop the negative test_forward_rejects_return_dict_kwarg (pinned a breaking TypeError, used a bare except TypeError that would have accepted unrelated regressions for the wrong reason) and replace with three positive propagation tests that pin the actual tuple-return shape for mode="encode", mode="decode", and mode="all" with return_dict=False, plus the asymmetric-propagation invariant for mode="all" (internal encode stays return_dict=True, terminal decode_ receives the user's kwarg). Copilot findings addressed: - 3187940844 (vae.py): removing **kwargs is a breaking API change. - 3187940903 (test): pinned TypeError + bare-except blocks non-breaking fixes and accepts unrelated regressions.
…**kwargs surface
Cycle 7 Copilot 3188128381 offered two valid options for the kwargs surface:
(a) "validate and strip the supported kwargs here" or (b) "make the signature
explicit". Cycle 7 took (b). Cycle 8 Copilot 3188197480 / 3188197524 ask we
take (a) instead — keep the **kwargs surface so the bug-fix scope stays on
the .latent_dist / .sample / self.decode regression rather than narrowing
the API.
Switch to option (a):
- Restore **kwargs in VideoAutoencoderKL.forward signature.
- Extract return_dict via kwargs.pop("return_dict", True) and propagate
explicitly to encode() / decode_().
- Other kwargs absorbed at the forward boundary; NOT propagated into the
helpers (cycle 7 finding 3188128381 — leakage into helpers raises
TypeError from inside them, harder to diagnose than entry-point absorb).
Test changes:
- Replace test_forward_unknown_kwarg_raises_type_error_at_forward_boundary
with test_forward_unknown_kwarg_absorbed_at_forward_boundary.
The new test pins the positive contract: forward succeeds with an unknown
kwarg AND the helper call list shows no leakage (unsupported_kwarg not in
encode_calls[0]). Strictly tighter than the cycle 7 negative TypeError
assertion on the no-leakage invariant cycle 7 cared about, while not
pinning the signature narrowing cycle 8 objects to.
- Update module docstring + propagate test docstring to reference both
cycle 7 and cycle 8 Copilot inline IDs.
Test result: tests-unit/comfy_test/seedvr_vae_forward_test.py: 10 passed in
1.88s. tests-unit/comfy_test/: 77 passed in 3.24s.
Codex Review -- Round 1 -- KICKOFFRunner: Prompt sent to codex reviewAwaiting codex output. The result will be posted as a separate comment on this PR when codex exits. |
There was a problem hiding this comment.
Pull request overview
This PR fixes comfy.ldm.seedvr.vae.VideoAutoencoderKL.forward() so it matches the actual return contract of encode() / decode_() (plain torch.Tensor by default, or (tensor,) when return_dict=False), removing the broken diffusers-style .latent_dist / .sample dereferences and the invalid self.decode(...) call.
Changes:
- Update
VideoAutoencoderKL.forward()to callencode()/decode_()correctly and return their outputs directly (withreturn_dictpropagation). - Add a focused unit test module that stubs the VAE and asserts correct behavior for
mode="encode",mode="decode", andmode="all", includingreturn_dict=Falseand AST-based checks to prevent regressions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
comfy/ldm/seedvr/vae.py |
Repairs VideoAutoencoderKL.forward() to use decode_() and to return tensors/tuples per the real encode()/decode_() contract. |
tests-unit/comfy_test/seedvr_vae_forward_test.py |
Adds regression coverage for forward() modes, return_dict propagation, encode→decode composition, and AST checks to block reintroducing .latent_dist/.sample/self.decode(. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codex Review -- Round 1 -- RESULTPR: #41 Prompt sent to codex reviewVerbatim codex review outputThis PR was reviewed using No merge-blocking defects were found in the latest PR state. Codex runner stderr (non-evidence)github_issues/{ISSUE_NUMBER}/pr_review_outputs/round{ROUND}_copilot_review.md gh api -X POST /repos/{OWNER/REPO}/pulls/{PR_NUMBER}/comments cycle = 0 ...truncated 191353 bytes (full stderr in round1_codex_stderr.txt)... eference to the image/video so we later can do a colour fix later exec exec exec codex |
|
Closed — operator instruction not followed correctly during regeneration. |
Plan: Fix VideoAutoencoderKL.forward to honor tensor/tuple return contract
Overview
VideoAutoencoderKL.forward()onpollockjj/ComfyUI:issue_101dereferencesdiffusers-style
.latent_distand.sampleattributes on values that arealready plain
torch.Tensor(or one-elementtuple) returns fromencode()and
decode_(). Direct module invocation viaforward(x, mode=…)raisesAttributeErrorimmediately, and themode == "decode"branch additionallycalls
self.decode(x)on a class that does not definedecode(onlydecode_). The fix replaces the buggy attribute access with the actualreturn contract and adds a regression test that exercises
forward()formode="encode",mode="decode", andmode="all"and asserts each return isa
torch.Tensorof the expected shape — binary equality, no tolerance bands.Diagnosis Summary
The buggy method body, captured live from
issue_101:comfy/ldm/seedvr/vae.pylines 2194–2207 (Ground Truth Probe GTP-3):
Live AST probe of
VideoAutoencoderKL(GTP-1) confirms the class definesencode,decode_, andforward, but has nodecodemember. The actualencode()body (GTP-2) returns the tensorposterior = DiagonalGaussianDistribution(h).mode()whenreturn_dict=True(the defaultunder
forward's call site) and(posterior,)whenreturn_dict=False.decode_()mirrors that contract —decoded(tensor) by default,(decoded,)when
return_dict=False. None of those returns expose.latent_distor.sample. Every code path of the currentforwardraises before producing aresult. Fix shape: route through
self.decode_(with the trailingunderscore), return tensors directly, and tolerate the optional one-element
tuple shape that
return_dict=Falsewould produce.The pre-fix runs against
issue_101:comfy/ldm/seedvr/vae.pyraiseAttributeError: 'Tensor' object has no attribute 'latent_dist'formode="encode"andmode="all", andAttributeError: 'VideoAutoencoderKL' object has no attribute 'decode'formode="decode". The same invocationpost-fix exits 0 with
4 passed. AC-1 / AC-2 capture this A/B pair ascommitted pytest logs.
Affected Repositories
pollockjj/ComfyUIis the deliverable: the fix tocomfy/ldm/seedvr/vae.pyand the new regression test under
tests-unit/comfy_test/land here onissue_190and PR back intoissue_101.pollockjj/mydevelopmentis the bookkeeping target: every committedartifact under
github_issues/190/slice1/(pytest logs, source extracts,diff transcripts, grep transcripts) lives on the outer workspace's
issue_190branch and PRs back intomainas the standard[bookkeeping] [Issue 101][eval-and-fix]pattern (see merged PRs Comfy-Org#197–Comfy-Org#201for the precedent).
Asset Readiness
Research and Methodology
Plan Foundations Comment URL: https://github.com/pollockjj/mydevelopment/issues/190#issuecomment-4378366792
Plan Foundations Comment Pin:
comment-id=IC_kwDOR2e1q88AAAABBPiTSA edited-at=2026-05-05T10:19:01ZDetected Scope:
none— trivial bug-fix where the existingencode()/decode_()return contract IS the spec; the fix duplicates that contractcorrectly inside
forward()and adds a regression test that locks thecontract.
The change class is "honor an existing internal API contract." No external
research, no canonical references, no metric definitions, and no published
anchor are invoked. The equivalence rule is binary type/shape equality
on the tensors returned by
forward()—type(result) is torch.Tensorandresult.shape == expected_shape. No tolerance bands; no statistical tests.Source authority is the live source of
comfy/ldm/seedvr/vae.pyon theissue's base branch (
issue_101), captured verbatim under## Ground Truth Probes.Binding parent-issue directives quoted verbatim from
pollockjj/mydevelopment#190 issue body (the tracking issue this plan
finalizes):
These three directives bound the scope of every AC below.
Tools, Pipeline, and Measurements
Plan Foundations Comment URL: https://github.com/pollockjj/mydevelopment/issues/190#issuecomment-4378366792
Plan Foundations Comment Pin:
comment-id=IC_kwDOR2e1q88AAAABBPiTSA edited-at=2026-05-05T10:19:01ZExisting tooling — REUSE only. Trivial scope; no external tools beyond
the change itself.
pytesttests-unit/requirements.txtpin (pertests-unit/README.md)git show issue_101:tests-unit/README.mddocumentspytest tests-unit/as the canonical invocationtorch.venv/pin on the deliverable slot/home/johnj/dev_cuda_1/ComfyUI/.venv/comfy.ldm.seedvr.vae.VideoAutoencoderKLissue_101HEADgitPipeline: edit one method body in one source file → add one test file →
run
pytestagainst the new test on issue_190 (post-fix) and againstthe same test with
vae.pyreverted toissue_101:comfy/ldm/seedvr/vae.py(pre-fix) → commit pytest logs, AST-extracted forward source, grep
transcripts, and a scope-bounded
git difftogithub_issues/190/slice1/on the bookkeeping branch.
Measurements: the only "measurement" is binary type and shape equality on
three tensor returns from
forward(). There is no metric, no anchor, nostatistical test, no sweep, and no characterization verdict. Single-probe
and boundary-bracketing requirements (HR-06, HR-11) do not apply.
Ground Truth Probes
cd /home/johnj/dev_cuda_1/ComfyUI && git show issue_101:comfy/ldm/seedvr/vae.py | python3 -c 'import ast,sys; tree=ast.parse(sys.stdin.read()); [print("class VideoAutoencoderKL methods:", [m.name for m in n.body if isinstance(m,(ast.FunctionDef,ast.AsyncFunctionDef))]) for n in ast.walk(tree) if isinstance(n,ast.ClassDef) and n.name=="VideoAutoencoderKL"]'class VideoAutoencoderKL methods: ['__init__', 'encode', 'decode_', '_encode', '_decode', 'slicing_encode', 'slicing_decode', 'tiled_encode', 'tiled_decode', 'forward']— i.e.encode,decode_, andforwardare members;decode(no underscore) is NOT a membercd /home/johnj/dev_cuda_1/ComfyUI && git show issue_101:comfy/ldm/seedvr/vae.py | sed -n '2101,2118p'encode/decode_return a tensor whenreturn_dict=True(the default at theforwardcall site) and a one-element tuple(tensor,)whenreturn_dict=False. Neither return path produces an object with.latent_distor.sample.cd /home/johnj/dev_cuda_1/ComfyUI && git show issue_101:comfy/ldm/seedvr/vae.py | sed -n '2194,2208p'.latent_diston lines 2200/2206, (b) accesses.sampleon lines 2203/2207, and (c) callsself.decode(...)on lines 2202/2206 — three distinct AttributeError sites that the fix removes.cd /home/johnj/dev_cuda_1/ComfyUI && git show issue_101:comfy/ldm/seedvr/vae.py | python3 -c 'import ast,sys; tree=ast.parse(sys.stdin.read()); [print("class VideoAutoencoderKLWrapper methods:", [m.name for m in n.body if isinstance(m,(ast.FunctionDef,ast.AsyncFunctionDef))]) for n in ast.walk(tree) if isinstance(n,ast.ClassDef) and n.name=="VideoAutoencoderKLWrapper"]'class VideoAutoencoderKLWrapper methods: ['__init__', 'forward', 'encode', 'decode', 'set_memory_limit']— combined with the AST-extracted body ofVideoAutoencoderKLWrapper.forwardfrom the same source, captured viapython3 -c 'import ast,sys; src=sys.stdin.read(); tree=ast.parse(src); [print(ast.get_source_segment(src,m)) for n in ast.walk(tree) if isinstance(n,ast.ClassDef) and n.name=="VideoAutoencoderKLWrapper" for m in n.body if isinstance(m,ast.FunctionDef) and m.name=="forward"]', yielding . Both literal output blocks were captured live on issue_101 HEAD; AC-6 cites GTP-4 to lock the wrapper class methods and forward body as the off-limits surface that the scope-diff artifact must not touch.cd /home/johnj/dev_cuda_1/ComfyUI && git ls-tree --name-only issue_101 tests-unit/comfy_test/issue_101,tests-unit/comfy_test/contains exactly two files (folder_path_test.pyandmodel_detection_test.py) and zero seedvr coverage. AC-7's pre-fix-fingerprint cites GTP-5 to lock the absence of anyseedvr_vae_forward_test.pyon the base branch.Every literal API surface the ACs below cite —
VideoAutoencoderKL,encode,decode_,forward, themodeparameter and itsLiteralvalues
"encode"/"decode"/"all", the.latent_distand.sampleattribute references in the buggy body, the
self.decode(call sitethat must become
self.decode_(, the off-limitsVideoAutoencoderKLWrapperclass and its
forwardbody, and the base-branchtests-unit/comfy_test/directory contents — is anchored to one of GTP-1, GTP-2, GTP-3, GTP-4,
GTP-5 above.
Created Surface Contract
tests-unit/comfy_test/seedvr_vae_forward_test.pyissue_190. Defines four pytest test functions that exerciseVideoAutoencoderKL.forward()against a stub subclass (which bypasses the heavy__init__viatorch.nn.Module.__init__(self)and overridesencode/decode_with known tensors):test_forward_encode_returns_tensor,test_forward_decode_returns_tensor,test_forward_all_returns_tensor,test_forward_source_has_no_diffusers_attr_access. The first three asserttype(result) is torch.Tensorandresult.shape == expected_shapefor eachmode. The fourth usesinspect.getsource(VideoAutoencoderKL.forward)and asserts".latent_dist" not in src,".sample" not in src, and a regexr"self\.decode\("(open paren, no underscore) does not match.github_issues/190/slice1/pytest_post_fix.logissue_190. Verbatim stdout/stderr ofcd /home/johnj/dev_cuda_1/ComfyUI && python3 -m pytest tests-unit/comfy_test/seedvr_vae_forward_test.py -vrun on issue_190 HEAD. Final line contains4 passed.github_issues/190/slice1/pytest_pre_fix.logissue_190. Verbatim stdout/stderr of the same pytest invocation captured aftergit checkout issue_101 -- comfy/ldm/seedvr/vae.pyis applied to the deliverable working tree. Captures threeAttributeErrorfailures on the encode/decode/all tests plus the source-shape assertion failure. Restored to issue_190 HEAD viagit restore comfy/ldm/seedvr/vae.pyimmediately after capture.github_issues/190/slice1/forward_source.txtissue_190. Verbatim AST-extracted source ofVideoAutoencoderKL.forwardfrom issue_190 HEADcomfy/ldm/seedvr/vae.py, produced bypython3 -c 'import ast; src=open("comfy/ldm/seedvr/vae.py").read(); tree=ast.parse(src); cls=[n for n in ast.walk(tree) if isinstance(n,ast.ClassDef) and n.name=="VideoAutoencoderKL"][0]; m=[n for n in cls.body if isinstance(n,ast.FunctionDef) and n.name=="forward"][0]; print(ast.get_source_segment(src,m))'.github_issues/190/slice1/forbidden_attrs_grep.logissue_190. Output ofgrep -n -E '\.latent_dist|\.sample' github_issues/190/slice1/forward_source.txt. Exit code 1, zero lines.github_issues/190/slice1/decode_call_grep.logissue_190. Output ofgrep -n -E 'self\.decode\(' github_issues/190/slice1/forward_source.txt. Exit code 1, zero lines. (self.decode_(is permitted; the regex requires an open paren immediately afterdecode.)github_issues/190/slice1/scope_diff.txtissue_190. Output ofcd /home/johnj/dev_cuda_1/ComfyUI && git diff issue_101..issue_190 -- comfy/ldm/seedvr/vae.py. The diff shows zero hunks outside the body ofVideoAutoencoderKL.forward(lines 2194–2207 on the issue_101 side);encode,decode_,_encode,_decode,slicing_encode,slicing_decode,tiled_encode,tiled_decode, andVideoAutoencoderKLWrapperare all unchanged.Slices
Slice 1: Fix VideoAutoencoderKL.forward tensor/tuple contract
Kind: implementation
Objective: Prove that
VideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched).Acceptance Criteria
cd /home/johnj/dev_cuda_1/ComfyUI && python3 -m pytest tests-unit/comfy_test/seedvr_vae_forward_test.py -vexits 0 with4 passedin the summary line — verified by committed artifactgithub_issues/190/slice1/pytest_post_fix.logwhose last non-blank line ends with4 passed.AttributeError: 'Tensor' object has no attribute 'latent_dist'(and analogous.sample/decodeerrors) on every encode/decode/all test (Diagnosis Summary §"Diagnosis Summary"; GTP-3)4 passedVideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched)."tests-unit/comfy_test/seedvr_vae_forward_test.py -vproves the same observable flips across the fix:github_issues/190/slice1/pytest_pre_fix.logrecords at least threeAttributeErrorfailures plus thetest_forward_source_has_no_diffusers_attr_accessfailure aftercd /home/johnj/dev_cuda_1/ComfyUI && git checkout issue_101 -- comfy/ldm/seedvr/vae.py, andgithub_issues/190/slice1/pytest_post_fix.logrecords pytest exit 0 with4 passedaftergit restore comfy/ldm/seedvr/vae.pyrestores issue_190 HEAD.python3 -m pytest tests-unit/comfy_test/seedvr_vae_forward_test.py -vinvocation raisesAttributeErrorin the encode/decode/all paths whenvae.pyis reverted to issue_101 (Diagnosis Summary §"Diagnosis Summary"; GTP-3)4 passedand zeroAttributeErrorfailuresVideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched)."VideoAutoencoderKL.forwardon issue_190 HEAD contains zero occurrences of the literal.latent_dist— verified by committed artifactsgithub_issues/190/slice1/forward_source.txt(the extracted body) andgithub_issues/190/slice1/forbidden_attrs_grep.log(grep -n -E '\.latent_dist|\.sample' forward_source.txtexit code 1, zero matching lines)..latent_distoccurrences on lines 2200 and 2206 of issue_101'svae.py.latent_distreferences survive in the post-fix forward body; the grep log is emptyVideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched)."VideoAutoencoderKL.forwardon issue_190 HEAD contains zero occurrences of the literal.sample— verified by the same committed artifacts as AC-3 (forward_source.txtplusforbidden_attrs_grep.log); the same combined grep covers both literals and reports zero matches for either..sampleoccurrences on lines 2203 and 2207 of issue_101'svae.py.samplereferences survive in the post-fix forward bodyVideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched)."VideoAutoencoderKL.forwardon issue_190 HEAD contains zero occurrences of the regexself\.decode\((open paren immediately afterdecode, no trailing underscore) — verified by committed artifactgithub_issues/190/slice1/decode_call_grep.log(grep -n -E 'self\.decode\(' forward_source.txtexit code 1, zero matching lines).self.decode_(references — if the implementer chooses to callself.decode_formode="decode"andmode="all"— are permitted because the regex requires the next character afterdecodeto be(.self.decode(call sites on lines 2202 and 2206 of issue_101'svae.py; GTP-1 confirmsdecodeis not defined on the classself.decode((open-paren-immediately) call sites remain; route is exclusively throughself.decode_VideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched)."cd /home/johnj/dev_cuda_1/ComfyUI && git diff issue_101..issue_190 -- comfy/ldm/seedvr/vae.pyproduces hunks confined to the line range ofVideoAutoencoderKL.forwardon the issue_101 side (lines 2194–2207 per GTP-3) and zero hunks touchingencode,decode_,_encode,_decode,slicing_encode,slicing_decode,tiled_encode,tiled_decode, or any line ofVideoAutoencoderKLWrapper(per GTP-4) — verified by committed artifactgithub_issues/190/slice1/scope_diff.txt. The artifact contains the verbatim diff plus a final stanza listing every@@-hunk header range and confirming each falls inside[2194, 2207]on the-side.VideoAutoencoderKLWrapper.forwardper Add support for file list refresh feature in node Comfy-Org/ComfyUI#192 — captured live as GTP-4, encode/decode_ signatures per "plan drift" guard)vae.pyside is confined to theforwardmethod body; the artifact's final stanza enumerates each hunk and asserts in-rangeVideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched)."tests-unit/comfy_test/seedvr_vae_forward_test.pyon issue_190 defines four pytest test functions whose names are exactlytest_forward_encode_returns_tensor,test_forward_decode_returns_tensor,test_forward_all_returns_tensor, andtest_forward_source_has_no_diffusers_attr_access; the first three assert bothtype(result) is torch.Tensorand an exactresult.shape == expected_shapeequality (binary, no tolerance band) for eachmode; the fourth runsinspect.getsource(VideoAutoencoderKL.forward)and asserts the absence of.latent_dist,.sample, and the regexr"self\.decode\("— verified by committed artifactgithub_issues/190/slice1/test_source.txt(cp /home/johnj/dev_cuda_1/ComfyUI/tests-unit/comfy_test/seedvr_vae_forward_test.py github_issues/190/slice1/test_source.txt) plus the AC-1 pytest log showing all four test names in thePASSEDlines.tests-unit/comfy_test/onissue_101contains exactly two files (folder_path_test.pyandmodel_detection_test.py) per GTP-5, so the regression test does not yet exist on the base branchPASSEDfor each by name; the binary type/shape assertions exclude tolerance-band variantsVideoAutoencoderKL.forward()returns plaintorch.Tensorvalues formode="encode",mode="decode", andmode="all"without dereferencing.latent_distor.sample, and that the change is scoped strictly to the body ofVideoAutoencoderKL.forward(no other method body or class touched)."Constraints
python3python3 -m pytest tests-unit/comfy_test/seedvr_vae_forward_test.py -vfrom the deliverable checkout root/home/johnj/dev_cuda_1/ComfyUI.venv/already providestorchandpytestper the slot layout in CLAUDE.mdpkill, norm -rf, nopython main.py, no/tmpwrites&&/||/;chainingpollockjj/ComfyUI:issue_190cut fromissue_101; PR target =issue_101github_issues/190/slice1/*) land onpollockjj/mydevelopment:issue_190cut frommain; PR target =mainVideoAutoencoderKL.forwardincomfy/ldm/seedvr/vae.py(encode, decode_, _encode, _decode, slicing_encode, slicing_decode, tiled_encode, tiled_decode, and the entireVideoAutoencoderKLWrapperclass are off-limits)encode()/decode_()signatures or return shapes (issue body explicit "plan drift" guard)pytestfrom the deliverable slot's.venv/— REUSE; no installcomfy.ldm.seedvr.vae.VideoAutoencoderKLimport path — REUSE; verified by GTP-1git,grep, AST extraction via stdlibastmodule — REUSEgithub_issues/190/slice1/are the only added paths in the bookkeeping repo.latent_dist,.sample,self.decode(in forward body) → AST-extracted committed source plus zero-match grep transcripts (AC-3, AC-4, AC-5)git diff issue_101..issue_190 -- vae.pywith hunk-range enumeration (AC-6)git stashor external decision deferral..gitignorerules for safe generated bulk, or discarded generated debris.issue_190(e.g. the?? github_issues/190/dispatch artifacts seen at plan time on the bookkeeping checkout) is repo provenance and is integrated, not removed as dirty-state cleanup.git status --shortgates locally on both/home/johnj/dev_cuda_1/ComfyUIand/home/johnj/dev_cuda_1/mydevelopmentand must refuse to submit while either is dirty.repo_hygiene.txt, rawgit status --shorttranscripts, orCLEANmarkers as QA evidence.git checkout issue_101 -- comfy/ldm/seedvr/vae.py) MUST be undone viagit restore comfy/ldm/seedvr/vae.pybefore any commit is created on the deliverable; the pre-fix log itself is committed only to the bookkeeping repo.Out of Scope
VideoAutoencoderKLWrapper.forward(lines 2226–2230 on issue_101) — same bug class (self.decode(z).sample) but tracked separately as pollockjj/mydevelopment#192. Do not touch.VideoAutoencoderKL.encode()orVideoAutoencoderKL.decode_()— signature, return shape, or body. The issue body explicitly flags such changes as plan drift; if implementation reveals a need to change them, stop and surface to the architect.comfy_extras/nodes_seedvr.py,tiled_vae, or other call sites ofencode()/decode_()outsideVideoAutoencoderKL.forward. The fix is scoped to one method body.mergeable=DIRTYand silent for two weeks per the issue body; pushing back toyousef-rafat:seedvr2is out of scope and requires a separate decision.issue_101and is not re-validated by this slice.type(result) is torch.Tensor,result.shape == expected_shape).**kwargsparameter onforward. Honoring the call-site contract is sufficient; the parameter list stays as captured in GTP-3.Tracked in pollockjj/mydevelopment Comfy-Org#190 (bookkeeping PR pollockjj/mydevelopment#203).