LTXVImgToVideoConditionOnly modifies its input latent in place, so cached runs can condition on a previous prompt's image
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start in latents.py at LTXVImgToVideoConditionOnly.generate, where samples = latent["samples"] is written in place by samples[:, :, : t.shape[2]] = t and the same tensor is returned. Confirm that the input comes from the cached EmptyLTXVLatentVideo output. To reproduce, run two i2v prompts with different images (A then B), then rerun A with a new text prompt and check that the first frame still matches A. Done when the cloned-tensor change makes that rerun start from image A and the first frame is no longer overwritten.
Written by the indexing model from the issue text.
Description
LTXVImgToVideoConditionOnly.generate in latents.py writes the encoded image into the input latent tensor in place:
samples = latent["samples"]
t = self.encode_image(image, samples.shape, vae)
# Apply encoded image to first frames
samples[:, :, : t.shape[2]] = t
and it returns that same tensor. When the input comes from EmptyLTXVLatentVideo (the usual i2v setup), ComfyUI caches that empty latent and reuses the same tensor object for every prompt with the same width, height and length. Each run of LTXVImgToVideoConditionOnly overwrites the shared cached tensor with its own first frame.
The node's own cached output holds a reference to that same tensor. So when a later prompt reuses the node's cached output (same image, same inputs, with only something downstream changed, such as the text prompt or the seed), the "conditioned" latent no longer contains that prompt's image. It contains whatever image the most recent other run wrote.
Reproduction (the same graph each time: LoadImage → resize → LTXVPreprocess → LTXVImgToVideoConditionOnly(latent = EmptyLTXVLatentVideo) → sampler):
- Queue a prompt with image A and text prompt P1, then let it finish.
- Queue a prompt with image B (and anything else), then let it finish.
- Queue image A again with a different text prompt, P2. The image chain is served from cache (
execution_cachedlists the LoadImage, preprocess andLTXVImgToVideoConditionOnlynodes).
Expected: the video in step 3 starts from image A.
Actual: the video in step 3 starts from image B. We confirmed that the LoadImage file in step 3 is image A (its hash matches), and that the step-3 video's first frame matches image B.
Fix: copy before writing, for example:
samples = latent["samples"].clone()
With that one change, the step-3 video starts from image A. We verified this on the same setup. The rest of latents.py looks fine: the other latent["samples"] use writes into a new tensor, and the AV path already clones its mask.
Environment: ComfyUI 0.28.0 (Linux, CUDA, --disable-smart-memory), ComfyUI-LTXVideo at the current master (latents.py last changed in 63a7f34e, 2026-09-17), LTX-2.3 22B fp8 distilled, i2v at 832×480, 73 frames.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 508
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Lightricks/ComfyUI-LTXVideo
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Lightricks/ComfyUI-LTXVideo#541 · 3 comments · 3 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Lightricks/ComfyUI-LTXVideo#525 · 6 comments · 3 reactions ·
-
001Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
Lightricks/ComfyUI-LTXVideo#589 ·
-
001Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
Lightricks/ComfyUI-LTXVideo#588 ·
-
bong_tangent optionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 47/100
Lightricks/ComfyUI-LTXVideo#587 ·
All issues in Lightricks/ComfyUI-LTXVideo
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
splunk/security_content#4418 ·
Maintainers usually reply within 1 day
-
[Bug / Enhancement]: Improve teleop_robot CLI with configurable timeout, robust input validation, and clean ROS shutdownPossibly taken @muskan-creates352 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
bug(pipelines): shortcode stripping deletes text between a {{< >}} shortcode and the next {{% %}}Possibly taken @Ashborne-lab claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kubeflow/docs-agent#293 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Imbad0202/academic-research-skills#1093 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pierreaubert/gpui-toolkit#114 ·
Maintainers usually reply within 1 day