Skip to content

Add node for forcing tiled VAE encode #7924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Anghammar
Copy link

When using ComfyUI with Radeon + ROCm + WSL (and possibly other use cases) VAE encode/decode typically always results in OOM and reverts to the tiled version. There is already beta nodes for tiled VAE encode/decode, however some nodes has the VAE encoding "baked in" (e.g. I2V WAN node), thus leaving no options other than waiting for the OOM when encoding VAE.

This pull request adds a subclass to VAE class that overrides encode method with the tiled version, along with a node that will cast a given VAE to the tiled VAE version with desired tiled dimensions. Putting this node after the load VAE node will resolve the issue of having to wait for OOM when encoding VAE.

@Anghammar Anghammar requested a review from comfyanonymous as a code owner May 3, 2025 16:06
@Anghammar Anghammar force-pushed the force-tiled-VAE-node branch from 32319bf to ae2e657 Compare May 10, 2025 10:55
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.

1 participant