r/StableDiffusion • • 16h ago

News New local world models just dropped

WDDQ project page

Diffusion based, locally trainable and runnable. I trained this model of the elden ring margit fight over the last 6 hours on a 4090 using a little over a million frames (~200 bot generated fights)

Their huggingface has a fully trained minecraft model you can play! It's free and local and diffusion based.

I have no affiliation, but having worked countless ablations on every small world model publication I could find (diamond, dreamer, iris, storm, the delta variants of each), I can say this is a belligerent improvement over everything to come before it. It's conceptually similar to diamond as the latent refinement/decode + a dreamer style model (with the gru replaced by mamba-ish network, (someone corrected me below, it's not a mamba but im not familiar with gated deltanet; it looked like a mamba to me 🤷‍♂️(not a strong reader))) working as the dynamics model; I think they also decoupled the gradients in training

(I am that guy who claimed to have made this architecture last year; mine failed because I never got enough data and I'm bad at math :3) ((my main goal was the pixel policy that could beat margit, and I thought a world model would help with that, but in the end that policy is what generated the data used to train this world model... weird))

currently having policy and bots generate another 5 million frames of diversity data, planning to train a larger variant over the next few days, then distill it into something that runs real time

60 Upvotes

31 comments sorted by

8

u/WithFullForce 3h ago

It seems like so many developers think that their potential user base are mindreaders. What is the purpose and/or use case of this? That should be in your first three sentences. Even when I went to the TL;Dr of your home page I had to read it three times to get an inkling what you're about. It's very internal. I mean this as feedback, not whining.

2

u/Sl33py_4est 3h ago

oh also im not the dev im just some guy

2

u/Sl33py_4est 3h ago

its "playable" in that actions input cause output to change. it's too high latency for humans to play it right now, i could and likely will optimize for latency, but more so because training bots at slower than real time isnt practical. The purpose, as stated, is to train agents in, the reason it is so notable is that no privileged information went into training it. Privileged information would be like, reading game engine, or seeing future frames. It got a list of frames aligned to a list of controller inputs.

with only that it produced a functional world model.

The real world use case is mostly self driving cars and robots. things we don't want practicing in the real world, and things we literally cannot produce privileged data for (we can't read realities game engine to help our sim).

I used elden ring because i happened to have a little under 2 million frames aligned to controller inputs laying around. (a somewhat related prject where i trained an ai to beat margit using only pixels)

the step change isn't in "world model" the step change is "2 million controller aligned frames (something achievable by me, one dude, over a weekend) produced a coherent world model in 6 hours, on a single gaming gpu"

2

u/WithFullForce 2h ago

Buddy, you're doing it again. If I held a gun to your face and said "what is the purpose of this in 3-4 sentences. Answer as if I'm a small child (or a golden retriever) or I'll shoot.". What would you say?

I understand what you're going for, but I'm a nerd with degrees in related areas. The guy beside me would be reading this as if it was Greek.

1

u/Sl33py_4est 54m ago

it makes a space to train ai inside of, using very limited data. for training ai to do things where getting lots of data is hard or dangerous. this is a new technique that needs even less data.

5

u/stella_ruuxi 15h ago

checked the hf weights and it's only ~3.3gb total (552mb autoencoder + 2.78gb world model), compressing 640x360 down with a 4x32x32 patch into 32-dim latents. wild that a 6h 4090 run already looks that coherent on margit, what fps are you getting on inference?

5

u/Sl33py_4est 14h ago

coming back to say coherence after 6 hours is actually hurting my brain, like i don't know if people will be able to grasp how big of a step change this is

3

u/Nearby-Mood5489 12h ago

Let me be ppl: So you trained a model on a set of fights to just reproduce a video of set fights? What is it's purpose? Can you now tell it to fight against a mouse? Will you be able to fight against the mouse in game? Is it just to copy the looks and add whatever content/ads into it? I already hate ads of lookalikes trying to promote a totally different product.

3

u/Sl33py_4est 10h ago

its "playable" in that actions input cause output to change. it's too high latency for humans to play it right now, i could and likely will optimize for latency, but more so because training bots at slower than real time isnt practical. The purpose, as stated, is to train agents in, the reason it is so notable is that no privileged information went into training it. Privileged information would be like, reading game engine, or seeing future frames. It got a list of frames aligned to a list of controller inputs.

with only that it produced a functional world model.

The real world use case is mostly self driving cars and robots. things we don't want practicing in the real world, and things we literally cannot produce privileged data for (we can't read realities game engine to help our sim).

I used elden ring because i happened to have a little under 2 million frames aligned to controller inputs laying around. (a somewhat related prject where i trained an ai to beat margit using only pixels)

the step change isn't in "world model" the step change is "2 million controller aligned frames (something achievable by me, one dude, over a weekend) produced a coherent world model in 6 hours, on a single gaming gpu"

3

u/d20diceman 11h ago

If I understand correctly, the thing you're missing here is that world models are playable - it's not just making a video of the boss fight, it's making a playable boss fight.

Well, maybe not very playable given the low FPS which OP said they're getting, but an interactive experience at any rate.

2

u/Familiar-Art-6233 4h ago

Not a video, reproducing the fight itself.

As in they copied a playable boss fight by only training on the video and controller inputs, which is WILD

4

u/Sl33py_4est 14h ago edited 14h ago

absolute dogwater fps lmao. However it is totally unoptimized and there are plenty of low hanging fruit. I just kicked off the run with data i had laying around before i went to bed last night

for my elden ring: predictor is 30ms, latent diff 75ms (10steps), pixel diff 125ms (8steps), so 230ms per step, just under 5fps. Edit: yo my b, the parameter counts wouldve probably helped, totals around 200M with a similar split to the Minecraft example

havent tried the minecraft model they released or I would give numbers on that too

compiling should help, step distillation can help, full on student distillation once the teacher model saturates is an option. I think for comparable quality, total guess but 50ms should be broadly achievable. the predictor is dense, i kinda want to try changing to a MoE to increase parameter capacity while reducing latency, shave off a few ms there.

right now I am generating more training data at the total garbage speed of 1x. so I won't be able to test much of anything for a day or so lol

5

u/Aaron_rowe81 14h ago

the policy generating the fights means the world model is learning from states that controller can actually reach. that's a neat way to keep the training data close to what it'll need to handle

4

u/Sl33py_4est 14h ago

train policy to train world model to train policies type shi

3

u/Aaron_rowe81 13h ago

somehow the ploicy got assigned its own homework too

4

u/Cubey42 12h ago

as a 4090 also, what training settings worked? I'll have to try this tomorrow. is the dataset just gameplay footage? how long/size?

3

u/Sl33py_4est 10h ago

1.8 million 20fps game frames aligned with controller inputs. I basically used the loss recipe provided in their github, I would start with using it as close to exactly as documented and only veer when mandatory. it took like 11gb peak, but utilized more or less 99% of the gpu processing.

3

u/NoenD_i0 7h ago

all roads lead to DIAMOND

2

u/Sl33py_4est 6h ago edited 5h ago

diamond and dreamer have been pretty much kings of this space for the past several years

this is essentially just diamond with a recurrent dynamics model (similar to dreamer)

edit, corrected, this doesn't use a mamba c:

I'm bad at reading lol

2

u/NoenD_i0 6h ago

dreamer is fundamentally different, but shares a similar idea, also, diamond with memory is just edeline

1

u/Sl33py_4est 5h ago edited 4h ago

bro made me revise the entire post body

but I feel like saying this is like a dreamer style dynamics model with a diamond style latent predictor isn't fundamentally incorrect

u r right on the edeline bit,

reading isn't really my strong suit 🫡

1

u/NoenD_i0 4h ago

i just read the paper and i feel like i got lobotomized because this is beyond me on how it isnt just a flop ts crazy

1

u/Sl33py_4est 4h ago

what if diffusion,

but also

recurrent

"now kith"

1

u/NoenD_i0 4h ago

Yeah but that's just EDELINE is it not?

1

u/Sl33py_4est 3h ago

i believe the decoupling is important

recurrent dynamics and diffusive prediction kind of fight eachother when joint trained in my experience

but i also barely read and mostly look at the pictures and try stuff :3

1

u/NoenD_i0 3h ago

Hm, do you think this could be done on other games? I don't know, like train it on Mario paint or half life because I've never seen world models of either, and from my experience it's near impossible to get a good Mario paint world model (I mean, I do use like a 2012 CPU for all my stuff so that's explained but)

1

u/Sl33py_4est 3h ago

judging by how my ass slapped together an elden ring run that didn't immediately collapse

yes

get a better cpu xD

→ More replies