Text-to-Image
Diffusers
Safetensors
stable-diffusion
lora
template:sd-lora
sdxl
flash
sdxl-flash
lightning
turbo
lcm
hyper
fast
fast-sdxl
sd-community
Instructions to use sd-community/sdxl-flash-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use sd-community/sdxl-flash-lora with Diffusers:
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] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Black output photo
#1
by OlegXio - opened
i use a code
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")
