Skip to content

Conversation

@NeuralFault
Copy link
Contributor

  • Add TiledVAEModule with support for VAEDecodeTiled Comfy node
  • Add TiledVAECardViewModel and TiledVAECard UI with configurable parameters
    • Configurable parameters for Tile Size, Tile Overlap, and Temporal equivalents for Video VAEs with Comfy node defaults set.
  • Register TiledVAEModule as available module in SamplerCardViewModel
  • Add JsonDerivedType attributes for serialization support

In many cases, particularly with Nvidia GPUs, ComfyUI will automatically switch to Tiled VAE when it detects that memory for the process will be exceeded.

This is not as much the case with with AMD GPUs as once memory is exceeded the process will likely fail with OOM error.
Tiled VAE is widely recommended for use with AMD GPUs in generation workloads in general due to inefficiency in memory management for MIOpen convolutional steps during VAE Decode when working with resolutions above 1024px (or relative aspect ratios), particularly when hires/upscaling is involved.

This will also benefit in cases where the VAE Decode step produces OOM with Nvidia GPUs, especially those with low memory capacity, and allow the user to force it skipping the full untiled VAE Decode attempt saving generation time. Allowing less cases of CPU offloading for the VAE.

screenrecording-2025-11-18_17-03-23.mp4

NeuralFault and others added 2 commits November 18, 2025 16:52
- Add TiledVAEModule with support for VAEDecodeTiled Comfy node
- Add TiledVAECardViewModel and TiledVAECard UI with configurable parameters
- Register TiledVAEModule as available module in SamplerCardViewModel
- Add JsonDerivedType attributes for serialization support
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @NeuralFault, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant feature to enhance memory management during the VAE decoding process, especially for high-resolution image generation. By integrating a Tiled VAE Decode option, users can now proactively manage memory usage, preventing OOM errors that are common with certain GPU configurations or demanding workloads. The change provides a dedicated UI for configuring tiling parameters, offering greater control and stability during inference.

Highlights

  • Tiled VAE Decode Integration: Introduced a new TiledVAEModule to support the VAEDecodeTiled ComfyUI node, enabling tiled VAE decoding within the application's inference pipeline.
  • User Interface for Tiled VAE: Added a TiledVAECardViewModel and a corresponding TiledVAECard UI component, allowing users to configure parameters such as Tile Size, Overlap, Temporal Size, and Temporal Overlap directly within the application.
  • Module Registration and Serialization: The new TiledVAEModule has been registered as an available module in the SamplerCardViewModel, and JsonDerivedType attributes were added to ensure proper serialization support for the new module and its view model.
  • Memory Optimization for VAE Decoding: This feature aims to mitigate Out-Of-Memory (OOM) errors during VAE decoding, particularly beneficial for AMD GPUs and Nvidia GPUs with limited memory, especially when dealing with high resolutions or upscaling.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a Tiled VAE Decode feature, which is a valuable addition for users with memory-constrained GPUs. The implementation is solid, adding a new module, view model, and UI card, and correctly integrating them into the existing inference pipeline. I've identified a couple of minor issues in the UI implementation related to styling and usability that could be improved. Overall, this is a well-executed feature.

Copy link
Contributor

@mohnjiles mohnjiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mohnjiles mohnjiles merged commit a7207f8 into LykosAI:main Nov 21, 2025
2 of 3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2025
@NeuralFault NeuralFault deleted the inference-tiled-vae branch November 21, 2025 20:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants