r/StableDiffusion • • 1d ago

Resource - Update One-Step Text-to-Image Generation and Editing using Sphere encoders

Post image

S3Β is a one-step text-to-image generator trained from scratch on the latent sphere of a frozen visual encoder. It generates a 512x512 image in a single forward pass without guidance. Its latent space also supports zero-shot editing and layout control, and a fine-tuned version handles inpainting, outpainting, spatial control and instruction-based editing. The models here were independently trained on open data.

Model: https://huggingface.co/tomg-group-umd/sphere-t2i

45 Upvotes

16 comments sorted by

4

u/Total-Resort-3120 18h ago edited 18h ago

https://sphere-encoder.github.io/

"Sphere encoder enables versatile image editing capabilities across various scenarios, from OOD (Out-of-Distribution) transformations to composite harmonization. The entire editing is training-free, allowing for high-quality manipulation without the need for additional fine-tuning or task-specific optimization."

This is pretty cool, this new method has a lot of potential.

4

u/Significant-Baby-690 21h ago

WTF is latent sphere.

9

u/sareewala 20h ago

It turns the entire latent space into a sphere. ususally latents spaces are in a gaussian distribution, In a spherical encoder thay are forced a bounded spherical manifold. This enables one step genration and also latent inerpolations.
https://sphere-encoder.github.io
https://sphere-encoder.github.io/t2i/

An intersting feature of spherical latent space is every point on it now maps back to a valid image , which is not a case with normal latent space like flux2-vae.

1

u/Significant-Baby-690 20h ago edited 20h ago

Very .. wait for it .. smooth !

This might be big !

1

u/Antique_Quality_6157 2h ago

my brain just glossed right over that part ngl

0

u/BeautyxArt 13h ago

we still didn't asked WTF is latent (space).

2

u/jib_reddit 14h ago

512x512 was a poor resolution even 4 years ago.

1

u/SkirtSpare4175 20h ago

Interesante

1

u/Apprehensive_Sky892 20h ago

Thanks for sharing this, I guess the 1-step render joke is now officially dead and replaced by us waiting for a 0-tep AI model πŸ˜‚.

Can a similar approach be used to train video model? A decent 1-step video model would be groundbreaking 🎈

1

u/Significant-Baby-690 16h ago

There is nothing fundamentally different between video and image. It just generates more frames at once. Chances are pretty high it would "just work".

2

u/Apprehensive_Sky892 14h ago

In theory, you are right that a video model is just a DiT trained with frames of images rather than just one image.

In practice, who knows how well this "latent sphere" approach (which I do not understand) will work πŸ˜…

1

u/Guilty-History-9249 19h ago

How does on run inference on the models provided? I've got like 5 or 6 different web pages open, somewhere I saw reference to setup.sh in one README.md but can't find the file.

2

u/jarvvvis 11h ago

Hi, one of the paper author here! we are figuring out some of the code release permission and paperwork. It should be out next week.

1

u/Guilty-History-9249 9h ago

I could do early testing if you'd like. I'm retired, last at MSFT. Have 40+ years as a programmer. I have a dual 5090 setup. I'll certainly take a look when you release it.

I published perhaps the all time images per second performance flex with 1 step sdxs over 2.5 years ago with https://x.com/Dan50412374/status/1772832044848169229 That was on my 4090. I can do over 300 image/sec on my 5090.

Currently I'm doing all kinds of things with various real-time MiniMax H3 to get a good fps with larger resolution or more steps for better quality.

1

u/DietAshamed2246 11h ago

Is there ComfyUI support? Workflow?

1

u/Guilty-History-9249 8h ago

Why wait? πŸ˜„ About .11 seconds on my 5090 without optimizations.

I recognize this guy from samples above. Clearly cherry picked images. Tried the same thing with women's faces and the quality wasn't as good and many looked like this man. NOTE: This isn't a knock. I understand what it takes to train such a model. And this is version -1 of this given the code to do what I just did doesn't exist yet so I created it myself. Well done.