{"id":23803851,"url":"https://github.com/kpthedev/stable-karlo","last_synced_at":"2025-09-06T16:32:39.736Z","repository":{"id":65068157,"uuid":"581260096","full_name":"kpthedev/stable-karlo","owner":"kpthedev","description":"Upscaling Karlo text-to-image generation using Stable Diffusion v2.","archived":false,"fork":false,"pushed_at":"2023-01-18T21:52:55.000Z","size":73,"stargazers_count":46,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-03-24T01:55:15.513Z","etag":null,"topics":["ai-art","artificial-intelligence","generative-art","karlo","latent-diffusion","pytorch","stable-diffusion","txt2img","unclip"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kpthedev.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}},"created_at":"2022-12-22T17:39:36.000Z","updated_at":"2023-03-24T01:55:15.513Z","dependencies_parsed_at":"2023-02-10T18:15:39.302Z","dependency_job_id":null,"html_url":"https://github.com/kpthedev/stable-karlo","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpthedev%2Fstable-karlo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpthedev%2Fstable-karlo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpthedev%2Fstable-karlo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpthedev%2Fstable-karlo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpthedev","download_url":"https://codeload.github.com/kpthedev/stable-karlo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232133701,"owners_count":18477293,"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":["ai-art","artificial-intelligence","generative-art","karlo","latent-diffusion","pytorch","stable-diffusion","txt2img","unclip"],"created_at":"2025-01-01T22:34:33.647Z","updated_at":"2025-01-01T22:34:39.878Z","avatar_url":"https://github.com/kpthedev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stable-karlo\n\n![screenshot](https://user-images.githubusercontent.com/115115916/210285673-833ee286-c1a0-4d9d-a1e7-92991b9eb2f6.png)\n\nA Streamlit app that combines [Karlo](https://github.com/kakaobrain/karlo) text-to-image generations with the [Stable-Diffusion v2](https://github.com/Stability-AI/stablediffusion) upscaler in a simple webUI.\n\n\u003cbr/\u003e\n\n\u003e ### Now available on Google Colab:\n\u003e [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/kpthedev/stable-karlo-colab/blob/main/stable_karlo_colab.ipynb)\n\n\u003cbr/\u003e\n\n**Built with:**\n* [Huggingface Diffusers](https://github.com/huggingface/diffusers)🧨\n* [Pytorch](https://github.com/pytorch/pytorch)\n* [Streamlit](https://github.com/streamlit/streamlit)\n* [xformers](https://github.com/facebookresearch/xformers)\n\n## Install (Local)\n\n\u003e Note that [xformers](https://github.com/facebookresearch/xformers) is not in the `requirements.txt`. Using it is optional, but I'd recommend it if you have a GPU with low memory. You can follow the instructions on their repo to get it set up in the python environment.\n\n### Linux/MacOS\n```bash\ngit clone https://github.com/kpthedev/stable-karlo.git\ncd stable-karlo\npython -m venv .env\nsource .env/bin/activate\npip install -r requirements.txt\n```\n\n### Windows\n```bash\ngit clone https://github.com/kpthedev/stable-karlo.git\ncd stable-karlo\npython -m venv .env\n.env\\Scripts\\activate\npip install -r requirements.txt\npip install --upgrade --force-reinstall torch --extra-index-url https://download.pytorch.org/whl/cu117\n```\n\n## Running\nTo run the app, make sure you are in the `stable-karlo` folder and have activated the environment, then run:\n\n```bash\nstreamlit run app.py\n```\nThis should open the webUI in your browser automatically.\n\n\u003e The very first time you run the app, it will download the models from Huggingface. This may take a while, depending on your internet speed—the models are around 18GB total.\n\n### Memory Requirements\nIn the settings of each model, there are options for lowering the VRAM requirements:\n\n* Both model settings have a **Use CPU offloading** option, which will substantially lower the VRAM usage.\n* The Upscaler has two other methods to lower the VRAM usage:\n  * **Downscale input image** - takes the Karlo image that is fed into the upscaler and downscales it to the specified size\n  * **Use xformers** - uses xformers' efficent memory attention to lower the VRAM usage (this option requires a working xformers installation)\n  \n  ---\n    \n  | Model | Optimizations | VRAM Usage |\n  |--------|---------------|------------|\n  | Karlo | none | 10GB |\n  | Karlo | CPU-offloading | 7GB |\n  \n  | Model | Optimizations | VRAM Usage |\n  |--------|---------------|------------|\n  | Karlo + Upscale | none | \u003e24GB |\n  | Karlo + Upscale | Downscale to \u003c 190px | 12GB |\n  | Karlo + Upscale | xformers | 15GB |\n  | Karlo + Upscale | CPU-offloading + xformers | 15GB |\n  | Karlo + Upscale | CPU-offloading + Downscale to \u003c 190px | 12GB |\n  | Karlo + Upscale | CPU-offloading + xformers + Downscale to \u003c 190px | 10GB |\n\n## License\nAll the original code that I have written is licensed under a GPL license. The licenses for the respective model weights, are included in the repository.\n\n## Changelog\n* Dec 22, 2022 - Inital release\n* Jan 02, 2023 - Add CPU offloading\n* Jan 18, 2023 - Add Google Colab support\n* Apr 06, 2023 - Update to use new Streamlit cache\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpthedev%2Fstable-karlo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpthedev%2Fstable-karlo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpthedev%2Fstable-karlo/lists"}