Skip to content

Conversation

@little6neko
Copy link

My device has 64GB of memory, and running more than four windows causes memory exhaustion. To bypass this limitation and generate videos indefinitely while maintaining consistency, I added the start_ref_image parameter to manually provide a reference image—typically the last frame from the previous video generation. I tested consistency, and the results are nearly identical to those achieved with automatic window segmentation.

@kslz
Copy link

kslz commented Jan 1, 2026

Do I need to skip the validation here?
image

context_options are not compatible or necessary with WanAnim looping, since it creates the video in a loop.

@little6neko
Copy link
Author

little6neko commented Jan 1, 2026 via email

@kslz
Copy link

kslz commented Jan 1, 2026

No need. This modification doesn't require context_options.

---- Replied Message ---- | From | @.> | | Date | 01/01/2026 14:54 | | To | kijai/ComfyUI-WanVideoWrapper @.> | | Cc | 小六妞儿 @.>, Author @.> | | Subject | Re: [kijai/ComfyUI-WanVideoWrapper] feat(wanvideo): add manual start reference support for WanAnimate loop (PR #1840) | kslz left a comment (kijai/ComfyUI-WanVideoWrapper#1840) Do I need to skip the validation here? image.png (view on web) context_options are not compatible or necessary with WanAnim looping, since it creates the video in a loop. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

但是我在运行的时候报了这个提示

@kslz
Copy link

kslz commented Jan 1, 2026

稍等 可能是我改的不对 我再试一下

@little6neko
Copy link
Author

little6neko commented Jan 1, 2026 via email

@dudcks0994
Copy link

hi, im using wan animate as replacing mode.
what is proper usage of your changes?
these days im finding solution for degrading quality that masked part in video generation when video length is long.

i put reference image to ref_image and start_ref_image both but there is still degradation exist.

@little6neko
Copy link
Author

hi, im using wan animate as replacing mode. what is proper usage of your changes? these days im finding solution for degrading quality that masked part in video generation when video length is long.

i put reference image to ref_image and start_ref_image both but there is still degradation exist.

ref_image and start_ref_image cannot use the same image. The function of start_ref_image is identical to the original auto-looping feature. For example, when the total frame count is 305 = 77 * 4 - 3, WanAnimateEmbeds will automatically divide the sequence into 4 segments. Each segment uses the last frame of the preceding segment as its start_ref_image. However, due to memory constraints, videos lasting several minutes may exceed thousands of frames. This necessitates manually splitting the video into multiple segments for separate generation. Here, start_ref_image serves its purpose: inputting the last frame from the previous generation ensures consistency (matching the automatic segmentation effect of WanAnimateEmbeds).

@little6neko
Copy link
Author

The function of ref_image remains unchanged; simply input the character or clothing you wish to replace as usual.

@kslz
Copy link

kslz commented Jan 1, 2026

hi, im using wan animate as replacing mode. what is proper usage of your changes? these days im finding solution for degrading quality that masked part in video generation when video length is long.
i put reference image to ref_image and start_ref_image both but there is still degradation exist.

ref_image and start_ref_image cannot use the same image. The function of start_ref_image is identical to the original auto-looping feature. For example, when the total frame count is 305 = 77 * 4 - 3, WanAnimateEmbeds will automatically divide the sequence into 4 segments. Each segment uses the last frame of the preceding segment as its start_ref_image. However, due to memory constraints, videos lasting several minutes may exceed thousands of frames. This necessitates manually splitting the video into multiple segments for separate generation. Here, start_ref_image serves its purpose: inputting the last frame from the previous generation ensures consistency (matching the automatic segmentation effect of WanAnimateEmbeds).

比如说我在生成了1-60帧后想继续生成,就可以输入第60帧,然后选择生成61-120帧 对吗?

@little6neko
Copy link
Author

little6neko commented Jan 1, 2026 via email

@kslz
Copy link

kslz commented Jan 1, 2026

对的

非常感谢,我实现了我想要的效果
Thanks a lot.

@kslz
Copy link

kslz commented Jan 2, 2026

我用WanVideo Animate Embeds控制循环的时候 画质会逐渐劣化,如果我用你的这个改动每次手动上传最后一帧来重新生成,劣化的问题会有改善吗

@little6neko
Copy link
Author

我用WanVideo Animate Embeds控制循环的时候 画质会逐渐劣化,如果我用你的这个改动每次手动上传最后一帧来重新生成,劣化的问题会有改善吗

这个实际只是扩展了WanVideo Animate Embeds的循环,效果与WanVideo Animate Embeds的自动循环是一致的,只是为了保持手动分段后的一致性,劣化问题无法避免

@kslz
Copy link

kslz commented Jan 2, 2026

我用WanVideo Animate Embeds控制循环的时候 画质会逐渐劣化,如果我用你的这个改动每次手动上传最后一帧来重新生成,劣化的问题会有改善吗

这个实际只是扩展了WanVideo Animate Embeds的循环,效果与WanVideo Animate Embeds的自动循环是一致的,只是为了保持手动分段后的一致性,劣化问题无法避免

抱歉再问下 对于这个劣化问题 你目前有什么解决方案吗

@little6neko
Copy link
Author

抱歉再问下 对于这个劣化问题 你目前有什么解决方案吗

我平时生成的基本不超3分钟,我感觉3分钟内基本没劣化,因此没怎么研究过劣化问题。代码里这个参考帧是写死只参考一帧的,也许改成每次都参考5帧能改善劣化问题

@kslz
Copy link

kslz commented Jan 2, 2026

抱歉再问下 对于这个劣化问题 你目前有什么解决方案吗

我平时生成的基本不超3分钟,我感觉3分钟内基本没劣化,因此没怎么研究过劣化问题。代码里这个参考帧是写死只参考一帧的,也许改成每次都参考5帧能改善劣化问题

再次感谢

@dudcks0994
Copy link

i usually generate 20sec~1mins video not using start_ref, but only native wananimate embed and comfy loop.
almost case got color and qualty degradation in 10sec after begining video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants