-
-
Notifications
You must be signed in to change notification settings - Fork 498
Add Feature - Tiled VAE Decode to Inference #1469
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
Conversation
- 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
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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.
Updated Margin values for NumberBox controls in TiledVAECard.axaml.
mohnjiles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
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