Run this model with HF Jobs

Run sd-community/sdxl-flash-lora on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/sd-community/sdxl-flash-lora. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/sd-community/sdxl-flash-lora on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("fluently/Fluently-XL-v4", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("sd-community/sdxl-flash-lora")

prompt = "<lora:sdxl-flash-lora:0.55>"
image = pipe(prompt).images[0]

SDXL Flash with LoRA in collaboration with Project Fluently

preview

Introducing the new fast model SDXL Flash, we learned that all fast XL models work fast, but the quality decreases, and we also made a fast model, but it is not as fast as LCM, Turbo, Lightning and Hyper, but the quality is higher. Below you will see the study with steps and cfg.

--> Work with LoRA <--

  • Trigger word:
    <lora:sdxl-flash-lora:0.55>
    
  • Optimal LoRA multiplier: 0.45-0.6 (the best - 0.55)
  • Optimal base model: fluently/Fluently-XL-v4

Steps and CFG (Guidance)

steps_and_cfg_grid_test

Optimal settings

  • Steps: 6-9
  • CFG Scale: 2.5-3.5
  • Sampler: DPM++ SDE

Diffusers usage

pip install torch diffusers
import torch
from diffusers import StableDiffusionXLPipeline, DPMSolverSinglestepScheduler
# Load model.
pipe = StableDiffusionXLPipeline.from_pretrained("sd-community/sdxl-flash", torch_dtype=torch.float16).to("cuda")
# Ensure sampler uses "trailing" timesteps.
pipe.scheduler = DPMSolverSinglestepScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
# Image generation.
pipe("a happy dog, sunny day, realism", num_inference_steps=7, guidance_scale=3).images[0].save("output.png")
Downloads last month
96
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for sd-community/sdxl-flash-lora

Adapter
(1)
this model

Spaces using sd-community/sdxl-flash-lora 3