{"id":23831877,"url":"https://github.com/onitake/diffusion-cli","last_synced_at":"2025-04-11T21:18:50.320Z","repository":{"id":146469588,"uuid":"607340810","full_name":"onitake/diffusion-cli","owner":"onitake","description":"Command line diffuser prompt","archived":false,"fork":false,"pushed_at":"2023-05-20T09:57:24.000Z","size":55,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T21:18:47.452Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onitake.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,"publiccode":null,"codemeta":null}},"created_at":"2023-02-27T19:45:50.000Z","updated_at":"2024-01-24T16:35:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3690af1-05b0-47b1-a48e-219f977a3af4","html_url":"https://github.com/onitake/diffusion-cli","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/onitake%2Fdiffusion-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fdiffusion-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fdiffusion-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fdiffusion-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onitake","download_url":"https://codeload.github.com/onitake/diffusion-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480439,"owners_count":21110939,"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":"2025-01-02T14:05:52.788Z","updated_at":"2025-04-11T21:18:50.313Z","avatar_url":"https://github.com/onitake.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diffuser CLI\n\nA simple command line tool to generate images with diffuser pipelines.\n\nUses the ROCm version of PyTorch by default, for AMD GPU support.\nSee below if you prefer the vanilla version with CUDA.\n\n## Disclaimer\n\nThis script is provided for personal entertainment purposes only.\nPlease respect the rights of others when using it, and honor the licenses\nof the models you download.\n\nPlease see the LICENSE file for details on permitted use of the script itself.\n\n## Quickstart\n\nFor a good initial experience, download a popular model, such as\n[stable-diffusion-v1-4](https://huggingface.co/CompVis/stable-diffusion-v1-4)\nor [waifu-diffusion](https://huggingface.co/hakurei/waifu-diffusion), as well as the\n[LPW pipeline script](https://github.com/huggingface/diffusers/blob/main/examples/community/lpw_stable_diffusion.py).\nMake sure you have git-lfs installed, or Git won't download the big files!\n\n```\nwget \u003curl-to-lpw_stable_diffusion.py\u003e\ngit clone \u003crepository-url-here\u003e\n```\n\nPyTorch for AMD GPUs requires the ROCm HIP runtime.\nSee [AMD ROCm Release Documentation](https://docs.amd.com/category/Release%20Documentation)\nfor installation instructions. The package is called: `rocm-hip-runtime`\n\nThen start the CLI with:\n```\npipenv run ./diffuse.py --batch 1 --model waifu-diffusion --custom lpw_stable_diffusion.py\n```\n\nThe first run will download all necessary Python modules and precompile\nTorch kernels. Subsequent runs will be faster.\n\nOn a GPU with sufficient VRAM, you can increase the batch size to generate\nmultiple images in one go, with increased performance.\n\n`pipenv run ./diffuse.py --help` will show other supported options.\n\n## Image replacement\n\nImage replacement (or image2image mode) is also supported.\n\nUse the `--image` parameter to specify a starting image, and control the influence\nwith `--strength`. Lower values correspond with a stronger influence.\nThe valid range is from 0.0 to 1.0.\n\n## Other GPUs or operating systems\n\nDepending on the target platform, you need to use a different PyTorch flavor.\nThe default is ROCm for AMD GPUs.\n\nRefer to https://pytorch.org/get-started/locally/ for other options.\n\nOnce you've modified the `Pipfile`, you need to run `pipenv install` to\ndownload the new PyTorch framework.\n\n### NVIDIA CUDA\n\nIn `Pipfile`, Replace the line that says\n```\ntorch = {version = \"*\", index = \"pytorch\"}\n```\nwith\n```\ntorch = \"*\"\n```\n\n### CPU only\n\nIn `Pipfile`, Replace the line that says\n```\nurl = \"https://download.pytorch.org/whl/rocm5.2/\"\n```\nwith\n```\nurl = \"https://download.pytorch.org/whl/cpu/\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonitake%2Fdiffusion-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonitake%2Fdiffusion-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonitake%2Fdiffusion-cli/lists"}