{"id":21135280,"url":"https://github.com/cloneofsimo/lora_dreambooth_replicate","last_synced_at":"2025-10-20T09:41:26.435Z","repository":{"id":98903679,"uuid":"594014487","full_name":"cloneofsimo/lora_dreambooth_replicate","owner":"cloneofsimo","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-31T00:25:51.000Z","size":3820,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T00:05:22.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/cloneofsimo.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,"zenodo":null}},"created_at":"2023-01-27T11:51:58.000Z","updated_at":"2024-04-22T16:16:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"57443fd9-1125-4374-8438-5db569b79267","html_url":"https://github.com/cloneofsimo/lora_dreambooth_replicate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloneofsimo%2Flora_dreambooth_replicate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloneofsimo%2Flora_dreambooth_replicate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloneofsimo%2Flora_dreambooth_replicate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloneofsimo%2Flora_dreambooth_replicate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloneofsimo","download_url":"https://codeload.github.com/cloneofsimo/lora_dreambooth_replicate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloneofsimo%2Flora_dreambooth_replicate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258857383,"owners_count":22768732,"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":[],"created_at":"2024-11-20T06:48:02.820Z","updated_at":"2025-10-20T09:41:26.324Z","avatar_url":"https://github.com/cloneofsimo.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Use LoRA PTI Cog\n\nFirst, download the pre-trained weights [with your Hugging Face auth token](https://huggingface.co/settings/tokens):\n\n```\ncog run script/download-weights \u003cyour-hugging-face-auth-token\u003e\n```\n\nThen, you can run train your dreambooth:\n\n```\ncog predict -i instance_data=@quo.zip\n```\n\nResulting file will contain LoRAs that can be used with `patch_pipe` function:\n\n```python\nfrom diffusers import StableDiffusionPipeline\nfrom lora_diffusion import patch_pipe, tune_lora_scale, image_grid\nimport torch\n\nmodel_id = \"runwayml/stable-diffusion-v1-5\"\n\npipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(\n    \"cuda:1\"\n)\n\npatch_pipe(pipe, \"./step_1000.safetensors\")\nprompt = \"detailed photo of \u003cs1\u003e\u003cs2\u003e, detailed face, a brown cloak, brown steampunk corset, belt, virtual youtuber, cowboy shot, feathers in hair, feather hair ornament, white shirt, brown gloves, shooting arrows\"\n\ntune_lora_scale(pipe.unet, 0.8)\ntune_lora_scale(pipe.text_encoder, 0.8)\n\nimgs = pipe(\n    [prompt],\n    num_inference_steps=50,\n    guidance_scale=4.5,\n    height=640,\n    width=512,\n).images\n...\n\n```\n\nExample Doc on running safetensor PTI outputs at `inference_example.ipynb`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloneofsimo%2Flora_dreambooth_replicate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloneofsimo%2Flora_dreambooth_replicate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloneofsimo%2Flora_dreambooth_replicate/lists"}