{"id":13708440,"url":"https://github.com/MichWozPol/LEGO_StableDiffusion","last_synced_at":"2025-05-06T13:30:32.830Z","repository":{"id":173475957,"uuid":"577931047","full_name":"MichWozPol/LEGO_StableDiffusion","owner":"MichWozPol","description":"The project aim was to fine-tune the stable diffusion model in order to generate images in the LEGO style based on the prompt.","archived":false,"fork":false,"pushed_at":"2023-06-07T22:20:12.000Z","size":9728,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-13T18:43:42.960Z","etag":null,"topics":["fine-tuning","image-generation","machine-learning","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichWozPol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-13T21:25:52.000Z","updated_at":"2024-06-05T01:49:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfaf651c-b41b-47c3-85a1-5a78077aeb67","html_url":"https://github.com/MichWozPol/LEGO_StableDiffusion","commit_stats":null,"previous_names":["michwozpol/lego_stablediffusion"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichWozPol%2FLEGO_StableDiffusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichWozPol%2FLEGO_StableDiffusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichWozPol%2FLEGO_StableDiffusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichWozPol%2FLEGO_StableDiffusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichWozPol","download_url":"https://codeload.github.com/MichWozPol/LEGO_StableDiffusion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252693483,"owners_count":21789698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fine-tuning","image-generation","machine-learning","stable-diffusion"],"created_at":"2024-08-02T23:00:22.774Z","updated_at":"2025-05-06T13:30:27.816Z","avatar_url":"https://github.com/MichWozPol.png","language":"Python","funding_links":[],"categories":["Generating images of LEGO"],"sub_categories":["Posts"],"readme":"# LEGO_StableDiffusion\n\u003ch2\u003eOverview\u003c/h2\u003e\nThe project aim was to fine-tuned stable diffusion model in order to generate images in the LEGO style based on the prompt.\n\nFine-tuned model is created on top of Stable Diffusion text to image [model](https://huggingface.co/spaces/stabilityai/stable-diffusion).\n\nTo run app install requirements by typing: `pip3 install -r requirements`, then run the main app file `python3 app/main.py`, making sure you are in the root repo directory.\n\nDatabase was created by our own by scraping the LEGO pictures from websites such as gettyimages.com, istockphoto.com and brickset.com (scripts available in the `Preprocessing` directory). LEGO database with mixed figures and constructions images is available \u003ca href='https://www.kaggle.com/datasets/michasakowicz/lego-constructions-and-minifigures'\u003e here. \u003c/a\u003e\u003cbr /\u003e\nImage captioning was done using BLIP [model](https://github.com/salesforce/BLIP). Image captioning script (`image_captioning.py`) is available in the `Preprocessing/BLIP` project directory.\u003cbr /\u003e\nApp is created using [gradio](https://gradio.app) library. In order to change GPU index or models' names do it in the `app/main.py` file.\n\nModels are available here: https://www.kaggle.com/datasets/michasakowicz/lego-dataset-models.\n\n\u003ch2\u003eResults\u003c/h2\u003e\n\u003ch3\u003eImages:\u003ch3\u003e\n\nRubber Duck Aliens visiting\u003cbr /\u003e the Earth for the first time | A small cabin on top of a snowy\u003cbr /\u003e mountain in the style of Disney | A high tech solarpunk utopia\u003cbr /\u003e in the Amazon rainforest | An insect robot preparing \u003cbr /\u003ea delicious meal\n:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:\n![alt-text-1](results/img1.jpg \"Rubber Duck Aliens visiting the Earth for the first time\") | ![alt-text-1](results/img2.jpg \"A small cabin on top of a snowy mountain in the style of Disney\") | ![alt-text-1](results/img3.jpg \"A high tech solarpunk utopia in the Amazon rainforest\") | ![alt-text-1](results/img4.jpg \"An insect robot preparing a delicious meal​​\")\n\n\u003ch3\u003eApp:\u003c/h3\u003e\n\u003cimg src=\"results/app.jpg\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMichWozPol%2FLEGO_StableDiffusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMichWozPol%2FLEGO_StableDiffusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMichWozPol%2FLEGO_StableDiffusion/lists"}