Add Tesla T4 support, SDPA fallback, and Gradio demo#13
Conversation
akshatvishu
commented
Mar 6, 2026
- add Tesla T4 fallback for environments without native bfloat16
- upcast to float32 at generate time to avoid NaN audio on float16 hardware
- add flash-attn fallback to native PyTorch scaled_dot_product_attention
- include Gradio demo for easier local testing
- preserve original bfloat16 path on supported GPUs
- add Tesla T4 fallback for environments without native bfloat16 - upcast to float32 at generate time to avoid NaN audio on float16 hardware - add flash-attn fallback to native PyTorch scaled_dot_product_attention - include Gradio demo for easier local testing - preserve original bfloat16 path on supported GPUs Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
Summary of ChangesHello, 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 significantly enhances the model's compatibility and user experience by adding explicit support for Tesla T4 GPUs and providing a user-friendly Gradio demo. The changes ensure stable audio generation across different hardware configurations through intelligent data type handling and attention mechanism fallbacks, making the system more accessible and robust for various audio synthesis tasks. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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.
Code Review
This pull request introduces significant improvements by adding fallback support for Tesla T4 GPUs and a comprehensive Gradio demo for easier testing. However, it introduces critical security vulnerabilities: the Gradio UI allows arbitrary model paths leading to Remote Code Execution (RCE), the model's prompt construction is vulnerable to prompt injection, and the application is publicly shared by default, increasing remote exploitation risk. Additionally, a missing dependency in requirements.txt will prevent the Gradio demo from functioning correctly.
…usionAI#12) - Restore the outer autocast scope in generate() to fix the test regression. - Implement dynamic _autocast_context() to handle hardware-specific dtypes. - Update T4 policy to load float32 directly in demo and test scripts. - Retain defensive float16 -> float32 upcast in generate() for manual callers. Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
Normalize attention backends to 'eager' across all nested Qwen modules to prevent FlashAttention2 import errors on Colab T4 hardware. - Implement backend policy in cookbooks/test.py and gradio_demo.py. - Force top-level BailingMM config to 'eager' implementation. - Recursively override nested Qwen2 configs in AudioVAE (encoder/decoder backbones) to bypass automatic FlashAttention detection. - Maintain float32 for T4 while keeping bf16 paths for supported GPUs. Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
…rate Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
… of the repo. Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
Signed-off-by: akshatvishu <akshatnayak197@gmail.com>