[Diffusion] add FireRed-Image-Edit models#20862
Conversation
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 integrates the FireRed-Image-Edit-1.0 and FireRed-Image-Edit-1.1 models into SGLang Diffusion. The changes primarily involve aligning their configuration with existing Qwen-Image-Edit models and modifying the 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. 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. Footnotes
|
|
/tag-run-ci-label |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the FireRed-Image-Edit-1.0 and FireRed-Image-Edit-1.1 models. The changes are well-contained and justified. Specifically, token IDs are added to QwenImageArchConfig to accommodate differences in the new models' configuration files, and the models are registered in registry.py using appropriate existing configurations from a similar model. The implementation is sound and aligns with the existing codebase structure. I have reviewed the changes and find them to be correct.
| "FireRedTeam/FireRed-Image-Edit-1.0", | ||
| "FireRedTeam/FireRed-Image-Edit-1.1", | ||
| ], | ||
| model_detectors=[lambda hf_id: "firered-image-edit" in hf_id.lower()], |
There was a problem hiding this comment.
do we still this need, we're deprecating model_detectors
There was a problem hiding this comment.
I tested removing the model_detectors and verified that it works fine, so I have pushed a new commit to remove it.
|
/tag-and-rerun-ci |
|
/rerun-failed-ci |
4 similar comments
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
4 similar comments
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
Co-authored-by: yuumn <1010797597@qqã.com>
Co-authored-by: yuumn <1010797597@qqã.com>
Co-authored-by: yuumn <1010797597@qqã.com>
Co-authored-by: yuumn <1010797597@qqã.com>
Motivation
The FireRed team from Xiaohongshu has released two image editing models with the same architecture, FireRed-Image-Edit-1.0 and FireRed-Image-Edit-1.1, whose model structure is consistent with the Qwen-Image-Edit-2509 series.
However, some issues were encountered when directly deploying these two models for inference using SGLang Diffusion. This PR is intended to enable SGLang Diffusion to properly support inference and deployment for FireRed-Image-Edit-1.0 and FireRed-Image-Edit-1.1.
Modifications
The main changes consist of the following two code additions:
Modified files:
sglang/python/sglang/multimodal_gen/registry.pysglang/python/sglang/multimodal_gen/configs/models/encoders/qwen_image.pyAccuracy Tests
I tested it on 4 H20 GPUs using the following command.
I tested the service using the following script and obtained the correct results.
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci