Instructions to use tulvgengenr/MixGRPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use tulvgengenr/MixGRPO with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("tulvgengenr/MixGRPO", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Improve model card: add metadata, abstract, and sample usage
This PR significantly enhances the model card for MixGRPO by adding essential metadata and valuable content:
- Metadata:
pipeline_tag: text-to-image: Improves discoverability on the Hugging Face Hub for image generation tasks.library_name: diffusers: Indicates compatibility with the popular Diffusers library, facilitating easy programmatic access.license: other: Clearly specifies the custom licensing terms.
- Content:
- Abstract: The full abstract from the paper is added to provide a concise overview of the model's purpose, methodology, and key findings.
- Sample Usage: A clear Python code snippet using the
diffuserslibrary is included, demonstrating how to load the model and generate images. This streamlines the onboarding process for users.
The existing links to the paper (arXiv), project page, and GitHub repository are preserved, ensuring all relevant external resources are still easily accessible.
Thanks very much!
It seems that the diffuser pipeline cannot use MixGRPO sampling, so I have temporarily dropped this part in the README. Also, please note that our sampling method uses mix sampling to alleviate the reward hacking problem. Specifically, it samples 50 steps by default, using the MixGRPO model for the first 30 steps and FLUX for the last 20 steps. For details, please refer to our inference code on GitHub: https://github.com/Tencent-Hunyuan/MixGRPO?tab=readme-ov-file#run-inference.