Downloads · 30 days
207
2% of all-time downloads
jieliu/SD3.5M-FlowGRPO-GenEval
SD3.5M-FlowGRPO-GenEval is a machine learning model from jieliu. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
[Update] We release a new GenEval model that maintains image quality close to the base model, while still achieving the original GenEval score of 95. Feel free to give it a try! This model is trained using Flow-GRPO w…
Downloads · 30 days
207
2% of all-time downloads
All-time downloads
12K
Public
Repo size
150 MB
Likes
9
Public
Click a slice to open those files.
.safetensors75.2 MB · 100%
From the Hugging Face model README
[Update] We release a new GenEval model that maintains image quality close to the base model, while still achieving the original GenEval score of 95. _Feel free to give it a try!
<!-- Provide a quick summary of what the model is/does. -->This model is trained using Flow-GRPO with LoRA. We provide only the LoRA weights here, so you will need to download the SD 3.5 Medium base model first.
import torch
from diffusers import StableDiffusion3Pipeline
from diffusers.schedulers import FlowMatchEulerDiscreteScheduler
from peft import PeftModel
model_id = "stabilityai/stable-diffusion-3.5-medium"
lora_ckpt_path = "jieliu/SD3.5M-FlowGRPO-GenEval"
device = "cuda"
pipe = StableDiffusion3Pipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe.transformer = PeftModel.from_pretrained(pipe.transformer, lora_ckpt_path)
pipe.transformer = pipe.transformer.merge_and_unload()
pipe = pipe.to(device)
prompt = 'a photo of a black kite and a green bear'
image = pipe(prompt, height=512, width=512, num_inference_steps=40,guidance_scale=4.5,negative_prompt="").images[0]
image.save(f"flow_grpo.png")