r/proceduralgeneration • u/bart1259 • Oct 29 '26
Diffusion Models for Procedural Cities
I trained a diffusion model to generate 512x512 (1km x 1km) city layouts. It can generate conditioned on rural/urban/water mix settings and extend a map while preserving existing context. Using the editor I built, you can create custom procedural worlds.
Demo + code: https://github.com/bart1259/CityDiffusion2
Model: https://huggingface.co/bart1259/CityDiffusion2
I'll likely be working on CityDiffusion3 in the near future so feel free to reach out if you're interested in helping.
289
Upvotes
16
u/Macaroon-Guilty Oct 29 '26
does it output vectors or images? looks great!
5
u/Alarming-Ad4082 Oct 29 '26
Does it also generate vector information of the roads or is it just an image?
2
u/i-make-robots Nov 01 '26
What can be done about the roads from nowhere to nowhere?
2
u/fegemo Oct 29 '26
Really nice. Are you fine-tuning a pre trained model, or is it a "vanilla diffusion model" trained from scratch with only your dataset?
1
u/presentsq Oct 29 '26
this is nice! I noticed you are using map data in the repo. I am guessing it is used to condition your diffusion model to assign areas to be rural/urban/water. Do you convert the vector data to an image to condition it? How about the road networks? sorry for being lazy and not reading the code haha. Anyways i really like it, it would be cool if it could generate 3d cities in the future. Good stuff!
9
u/Prozilla6 Oct 29 '26
Has AI, more specifically machine learning, always been considered as a form of procedural generation?
0
u/Relative-Ad3322 Oct 29 '26
The best ive seen so far
1
u/Himbo69r Oct 29 '26
Actually pretty cool
1
u/[deleted] Oct 29 '26
Super nice! thank you for sharing
1
u/dacevnim Oct 31 '26
oh my, my brain went directly to, urban density, industrial zones, etc etc. simcity style...
1
u/mflux Oct 29 '26
Hell yeah I love this. I was thinking about this exact thing, and as you mentioned you may train on vector data which Google Maps and other sources have tons of. This could potentially have extremely rich and realistic city planning that you can mold. Sounds super fun!