{"id":26372717,"url":"https://github.com/bits-bytes-nn/musinsaigo","last_synced_at":"2026-05-22T05:09:27.107Z","repository":{"id":211715384,"uuid":"729039951","full_name":"bits-bytes-nn/musinsaigo","owner":"bits-bytes-nn","description":"Using SageMaker and LoRA to fine-tune the Stable Diffusion model and generate fashion images","archived":false,"fork":false,"pushed_at":"2024-01-14T11:16:33.000Z","size":48746,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T12:28:21.954Z","etag":null,"topics":["huggingface-accelerate","huggingface-diffusers","lora","sagemaker","stable-diffusion"],"latest_commit_sha":null,"homepage":"https://huggingface.co/youngmki/musinsaigo-2.0","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bits-bytes-nn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-12-08T09:14:55.000Z","updated_at":"2024-04-16T04:47:28.000Z","dependencies_parsed_at":"2024-01-14T12:45:18.314Z","dependency_job_id":null,"html_url":"https://github.com/bits-bytes-nn/musinsaigo","commit_stats":null,"previous_names":["aldente0630/musinsaigo","bits-bytes-nn/musinsaigo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bits-bytes-nn%2Fmusinsaigo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bits-bytes-nn%2Fmusinsaigo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bits-bytes-nn%2Fmusinsaigo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bits-bytes-nn%2Fmusinsaigo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bits-bytes-nn","download_url":"https://codeload.github.com/bits-bytes-nn/musinsaigo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955783,"owners_count":20374373,"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":["huggingface-accelerate","huggingface-diffusers","lora","sagemaker","stable-diffusion"],"created_at":"2025-03-17T01:18:58.166Z","updated_at":"2026-05-22T05:09:22.080Z","avatar_url":"https://github.com/bits-bytes-nn.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MUSINSA-IGO (MUSINSA fashion Image Generative Operator)\n- - -\n## MUSINSA-IGO 3.0 is a text-to-image generative model that fine-tuned [*Stable Diffusion XL 1.0*](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) with LoRA using street snaps downloaded from the website of [Musinsa](https://www.musinsa.com/app/), a Korean fashion commerce company. This is very useful for generating fashion images.\n\n### Examples\n- - -\n![assets-01](assets/assets-07.png)\n![assets-02](assets/assets-08.png)\n### Notes\n- - -\n* For example, the recommended prompt template is shown below.  \n\n**Prompt**: RAW photo, fashion photo of *subject*, (high detailed skin:1.2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3\n  \n**Negative Prompt**: (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, the worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck\n\n* The model is available in [this *Huggingface Hub* repository](https://huggingface.co/aldente0630/musinsaigo-3.0).\n\n* It is recommended to apply a cross-attention scale of 0.5 to 0.75 and use a refiner.\n\n### Usage\n- - -\n```python\nimport torch\nfrom diffusers import DiffusionPipeline\n\n\ndef make_prompt(prompt: str) -\u003e str:\n    prompt_prefix = \"RAW photo\"\n    prompt_suffix = \"(high detailed skin:1.2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3\"\n    return \", \".join([prompt_prefix, prompt, prompt_suffix]).strip()\n\n\ndef make_negative_prompt(negative_prompt: str) -\u003e str:\n    negative_prefix = \"(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), \\\n    text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, \\\n    extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, \\\n    bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, \\\n    extra arms, extra legs, fused fingers, too many fingers, long neck\"\n\n    return (\n        \", \".join([negative_prefix, negative_prompt]).strip()\n        if len(negative_prompt) \u003e 0\n        else negative_prefix\n    )\n\n\ndevice = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n\nmodel_id = \"aldente0630/musinsaigo-3.0\"\npipe = DiffusionPipeline.from_pretrained(\n    \"stabilityai/stable-diffusion-xl-base-1.0\", torch_dtype=torch.float16\n)\npipe = pipe.to(device)\npipe.load_lora_weights(model_id)\n\n# Write your prompt here.\nPROMPT = \"a korean woman wearing a white t - shirt and black pants with a bear on it\"  \nNEGATIVE_PROMPT = \"\"\n\n# If you're not using a refiner\nimage = pipe(\n    prompt=make_prompt(PROMPT),\n    height=1024,\n    width=768,\n    num_inference_steps=50,\n    guidance_scale=7.5,\n    negative_prompt=make_negative_prompt(NEGATIVE_PROMPT),\n    cross_attention_kwargs={\"scale\": 0.75},\n).images[0]\n\n# If you're using a refiner\nrefiner = DiffusionPipeline.from_pretrained(\n    \"stabilityai/stable-diffusion-xl-refiner-1.0\",\n    text_encoder_2=pipe.text_encoder_2,\n    vae=pipe.vae,\n    torch_dtype=torch.float16,\n)\nrefiner = refiner.to(device)\n\nimage = pipe(\n    prompt=make_prompt(PROMPT),\n    height=1024,\n    width=768,\n    num_inference_steps=50,\n    guidance_scale=7.5,\n    negative_prompt=make_negative_prompt(NEGATIVE_PROMPT),\n    output_type=\"latent\",\n    cross_attention_kwargs={\"scale\": 0.75},\n)[\"images\"]\n\ngenerated_images = refiner(\n    prompt=make_prompt(PROMPT),\n    image=image,\n    num_inference_steps=50,\n)[\"images\"]\n\nimage.save(\"test.png\")\n```\n![test](assets/test-03.png)\n\n### References\n\n---\n* [Zero-Shot Image-to-Text Generation with *BLIP-2*](https://huggingface.co/blog/blip-2?fbclid=IwAR1iTzu7a_2zSv6dyeQt2dlgEtPFDQTfcvXoudOgeVMDin4IGP8fUz61ZL8)  \n* [How to Fine-Tune *Stable Diffusion* Using *LoRA*](https://ngwaifoong92.medium.com/how-to-fine-tune-stable-diffusion-using-lora-85690292c6a8)   \n* [Using *LoRA* for Efficient Stable Diffusion Fine-Tuning](https://huggingface.co/blog/lora)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbits-bytes-nn%2Fmusinsaigo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbits-bytes-nn%2Fmusinsaigo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbits-bytes-nn%2Fmusinsaigo/lists"}