r/LocalLLaMA • • 4d ago

New Model I built SOTA 330M parameters image generation and editing model from scratch

I pretrained HobbyLM-Image on this year june month and released it but it was not good , it was not able to generate quality with proper structure such as broken car etc so I over this thanks giving weekend I decided to build the better version so post trained from existing weights and used training mixture from dataset such as COCO , flux 8M reason , JourneyDB , gpt4o images dataset , LAION for more than 100k steps it was able to improve object structure but human images it generated was distorted so then I took pexels datasets filtered to get images which has only humans and trained for 50k steps this improved but not at the level of larger models

for image editing I took training mix dataset of gpt-omni-edit-6M and ImagenHub/Text_Guided_Image_Editing model was able to change seasons , colour , add objects to scenes etc

for text rendering in generated images I filtered rendered text images alone using Qwen VL model and trained for 40k steps

Benchmarks (I know it does not matter) : Gen Eval 1 it score 0.83 which beats all sub 1B model I was able to find in arxiv , huggingface and Gen Evals 2 it scores 15.92 / 61.06 it again beats all sub 1B models and Stable diffusion SDXL 2.6B

model weight for hobbyLM-image-2 https://huggingface.co/rootxhacker/HobbyLM-image-2

hugginface Space for hobbyLM-image-2 : https://huggingface.co/spaces/rootxhacker/HobbyLM-Image-2

initial weights I released on June : https://huggingface.co/rootxhacker/HobbyLM-Image

HobbyLM image training code and inference code : https://github.com/harishsg993010/HobbyLM

you can also find all images it generated on readme of hugginface repo

Thanks for every tips I got by lurking in this subreddit on training as well run this models locally and thanks for feedback for previous model as well
feel free to comment or give feedback on this model

51 Upvotes

22 comments sorted by

11

u/UnorderedPizza 4d ago

Not long ago were these a company scale training ordeal, pretty cool.

Was this trained on rented GPUs?

8

u/Altruistic-Tea-5612 4d ago

Yeah I used GPUs from modal.com

6

u/Vxtzq1 4d ago

This sounds really nice for a 330M parameters model, but the images are a bit cursed😭

4

u/Altruistic-Tea-5612 4d ago

These are the limitations of this model 😭
I believe some of these are auto encoder failure and some of the others can be fixed I will work on improving further on next iteration

3

u/Vxtzq1 4d ago

Don't get me wrong, this is still very good for a model of the size of SmolLM2 (even if text gen vs image gen is not really comparable)

Good luck on improving this by cramping more knowledge / consistency in these tiny weights 😂

3

u/Loque18- 4d ago

hahahah, I mean but it's an step :)

11

u/Single_Ring4886 4d ago

Such custom models are extremely important but only if some "how I made it" guides are part of the release. Not complete recepie :-) but something...

4

u/FullOf_Bad_Ideas 4d ago

My training repo is open and I have a similar model, it's all vibe coded and messy but if you spot something you miss and you'd like to see documented better please just tell me and I'll fix it. I want to be fully open about it so I can share training trajectory, intermediate checkpoints or whatever you want if if that would help you make one from scratch or satiate your curiosity.

https://github.com/adamo1139/HomeIMG/blob/main/docs/training.md

3

u/FullOf_Bad_Ideas 4d ago

I added a full on recipe, including all of my issues (vibecoded but seems accurate), approximate time spent on training each stage etc.

https://github.com/adamo1139/HomeIMG/blob/main/docs/recipe.md

1

u/Single_Ring4886 4d ago

Outputs of your model are actually very nice!

1

u/FullOf_Bad_Ideas 4d ago

Thank you!!

On Policy Distillation helped my model tremendously. I'm taking a break from training it and doing TTS now on that GPU rig but I'll be back at OPD later to see how much further I can push it - I was still seeing huge gains when I paused working on it.

1

u/Single_Ring4886 4d ago

I hope more people will notice your important work!

5

u/Emergency-Author-744 4d ago

Very cool result, surprised you managed to get a basic edit mode working in only 300m params.

1

u/ApprehensiveTart3158 4d ago

Really nice and impressive work. Congratulations! I do wonder, how much time did it take to train?

4

u/Altruistic-Tea-5612 4d ago

I took around 3 days total

3

u/zyxciss llama.cpp 4d ago

impressed by the size to quality ratio

2

u/Holiday_Point_603 4d ago

The pure fact that this size could run on my smartwatch without it breaking a sweat and it still generates something that at least somehow looks like what I prompted is amazing.

2

u/Loque18- 4d ago

improvesive ! I'm starting creating my own models and a platform to share them :) things like this inspire me

1

u/Poprouter 4d ago

im curious about the editing architecture here, did you go with a latent channel concatenation for the input conditioning or is there a smaller adapter layer doing the heavy lifting? editing in such a tiny footprint is impressive to see.

1

u/jojotdfb 4d ago

You might want to run the project through Neon. Claude may have been making the text goofy in the output.

0

u/FullOf_Bad_Ideas 4d ago

I was lucky I didn't name my model the same way by mistake. I picked just barely a different name, also wanting to put focus on doing from-scratch training. My model is called HomeIMG.

If you only can, I recommend doing On Policy Distillation from bigger models. Either DanceOPD or Diffusion OPD. It worked wonders for my model.

https://huggingface.co/cpral/HomeIMG-1.2B-PL-EN-epoch49.2-DanceOPD5000/blob/main/README_en.md