News for hackers. Stuff that matters.
Re:Show HN: Real-time image generation with SDXL Lightning by minimaxir on Thursday February 22, 2024 @06:39PM (#39474903)
For posterity, SDXL Lightning is open source on Hugging Face with a relatively-permissive license: https://huggingface.co/ByteDance/SDXL-Lightning

There are a few other UIs for it, e.g. https://replicate.com/lucataco/sdxl-lightning-4step

Re:Show HN: Real-time image generation with SDXL Lightning by treesciencebot on Thursday February 22, 2024 @06:42PM (#39474926)
Yep, this is using SDXL Lightning underneath which is trained by ByteDance on top of Stable Diffusion XL and released as an open source model. In addition to that, it is using our inference engine and real-time infrastructure to provide a smooth experience compared to other UIs out there (which as far as I know, speed-wise, are not even comparable, ~370ms for 4 step here vs ~2-3 seconds in the replicate link you posted).
Re:Show HN: Real-time image generation with SDXL Lightning by smallerfish on Friday February 23, 2024 @05:50AM (#39479106)
Any plans to make an API? I'm building a website to catalog fairly common objects, and could use images to spice it up. I was looking at pexels...but this is just so much better.

EDIT - ah you have one. You're welcome. Sign up here folks. :)

Couple of questions in that case: a) What is the avg price per 512x512 image? Your pricing is in terms of machine resources, but (for my use case) I want a comparison to pexels. b) What would the equivalent machine setup be to get inference to be as fast as the website demo? c) Is the fast-sdxl api using the exact same stack as the website?

Re:Show HN: Real-time image generation with SDXL Lightning by drochetti on Friday February 23, 2024 @11:13AM (#39482449)
There's no hidden magic in the playground and in the demo app, we use the same API available for all customers and also the same JS client and best practices available in our docs.

To all your questions, I recommend playing with it in the API playground, you'll be able to test different image sizes, parameters, and have an idea of the cost per inference.

If you have any other questions, say hello on our Discord and I'm happy to help you.

https://fal.ai/models/stable-diffusion-xl-lightning

Re:Show HN: Real-time image generation with SDXL Lightning by 01HNNWZ0MV43FF on Thursday February 22, 2024 @11:10PM (#39476869)
What's the RAM and speed like for local inference?
Re:Show HN: Real-time image generation with SDXL Lightning by r-k-jo on Friday February 23, 2024 @12:32AM (#39477321)
It's using ~15GB VRAM
Re:Show HN: Real-time image generation with SDXL Lightning by lonk on Friday February 23, 2024 @06:40AM (#39479413)
What is the speed with CPU+16GB ram without GPU?
Re:Show HN: Real-time image generation with SDXL Lightning by whywhywhywhy on Friday February 23, 2024 @12:19PM (#39483410)
SDXL normally takes 40-60+ minutes per image on CPU so considering this is 1-4 steps instead of 20-25 steps you can make a guess.
Re:Show HN: Real-time image generation with SDXL Lightning by r-k-jo on Friday February 23, 2024 @12:27AM (#39477290)
I also made a demo with Gradio, but it's 2x slower than fal.ai! Using stable-fast compilation running on a single A10G

https://huggingface.co/spaces/radames/Real-Time-Text-to-Imag...

I you have GPU/cuda/Docker you can try it locally

docker run -it -p 7860:7860 --platform=linux/amd64 --gpus all -e SFAST_COMPILE="1" -e USE_TAESD="0" registry.hf.space/radames-real-time-text-to-image-sdxl-lightning:latest python app.py

Re:Show HN: Real-time image generation with SDXL Lightning by smcleod on Saturday February 24, 2024 @05:52PM (#39495883)
This is fantastic, thank you so much for taking the time to make a local demo available.