Downloads · 30 days
0
chaofengc/sdxl-turbo_texforce
sdxl-turbo_texforce is a machine learning model from chaofengc. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-sa-4.0.
Official PyTorch codes for paper Enhancing Diffusion Models with Text-Encoder Reinforcement Learning
Downloads · 30 days
0
Access
Public
Updated Dec 23, 2023
Repo size
29.9 MB
Likes
4
Public
Click a slice to open those files.
.safetensors29.9 MB · 100%
From the Hugging Face model README
Official PyTorch codes for paper Enhancing Diffusion Models with Text-Encoder Reinforcement Learning
We also applied our method to the recent model sdxl-turbo. The model is trained with ImageReward feedback through direct back-propagation to save training time. Test with the following codes
## Note: sdturbo requires latest diffusers installed from source with the following command
git clone https://github.com/huggingface/diffusers
cd diffusers
pip install -e .
from diffusers import AutoPipelineForText2Image
import torch
pipe = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16")
pipe = pipe.to("cuda")
pipe.load_lora_weights('chaofengc/sdxl-turbo_texforce')
pt = ['a photo of a cat.']
img = pipe(prompt=pt, num_inference_steps=1, guidance_scale=0.0).images[0]
