{"id":13574200,"url":"https://github.com/bes-dev/stable_diffusion.openvino","last_synced_at":"2025-05-15T18:00:23.745Z","repository":{"id":58114343,"uuid":"528167656","full_name":"bes-dev/stable_diffusion.openvino","owner":"bes-dev","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-29T07:28:19.000Z","size":2682,"stargazers_count":1533,"open_issues_count":95,"forks_count":206,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-07T22:11:10.906Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bes-dev.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}},"created_at":"2022-08-23T21:25:51.000Z","updated_at":"2025-03-23T14:28:37.000Z","dependencies_parsed_at":"2024-01-07T03:51:36.322Z","dependency_job_id":"6fd53929-7bf2-481f-bfb4-9a5240aa7d13","html_url":"https://github.com/bes-dev/stable_diffusion.openvino","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/bes-dev%2Fstable_diffusion.openvino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Fstable_diffusion.openvino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Fstable_diffusion.openvino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Fstable_diffusion.openvino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bes-dev","download_url":"https://codeload.github.com/bes-dev/stable_diffusion.openvino/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394718,"owners_count":22063984,"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-08-01T15:00:47.994Z","updated_at":"2025-05-15T18:00:23.693Z","avatar_url":"https://github.com/bes-dev.png","language":"Python","funding_links":[],"categories":["Table of Contents","Actively Maintained Forks and Containers","Python","Table of content"],"sub_categories":["AI - Computer Vision","Generative AI"],"readme":"# stable_diffusion.openvino\n\nImplementation of Text-To-Image generation using Stable Diffusion on Intel CPU or GPU.\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"data/title.png\"/\u003e\n\u003c/p\u003e\n\n## Requirements\n\n* Linux, Windows, MacOS\n* Python \u003c= 3.9.0\n* CPU or GPU compatible with OpenVINO.\n\n## Install requirements\n\n* Set up and update PIP to the highest version\n* Install OpenVINO™ Development Tools 2022.3.0 release with PyPI\n* Download requirements\n\n```bash\npython -m pip install --upgrade pip\npip install openvino-dev[onnx,pytorch]==2022.3.0\npip install -r requirements.txt\n```\n\n## Generate image from text description\n\n```bash\nusage: demo.py [-h] [--model MODEL] [--device DEVICE] [--seed SEED] [--beta-start BETA_START] [--beta-end BETA_END] [--beta-schedule BETA_SCHEDULE]\n               [--num-inference-steps NUM_INFERENCE_STEPS] [--guidance-scale GUIDANCE_SCALE] [--eta ETA] [--tokenizer TOKENIZER] [--prompt PROMPT] [--params-from PARAMS_FROM]\n               [--init-image INIT_IMAGE] [--strength STRENGTH] [--mask MASK] [--output OUTPUT]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --model MODEL         model name\n  --device DEVICE       inference device [CPU, GPU]\n  --seed SEED           random seed for generating consistent images per prompt\n  --beta-start BETA_START\n                        LMSDiscreteScheduler::beta_start\n  --beta-end BETA_END   LMSDiscreteScheduler::beta_end\n  --beta-schedule BETA_SCHEDULE\n                        LMSDiscreteScheduler::beta_schedule\n  --num-inference-steps NUM_INFERENCE_STEPS\n                        num inference steps\n  --guidance-scale GUIDANCE_SCALE\n                        guidance scale\n  --eta ETA             eta\n  --tokenizer TOKENIZER\n                        tokenizer\n  --prompt PROMPT       prompt\n  --params-from PARAMS_FROM\n                        Extract parameters from a previously generated image.\n  --init-image INIT_IMAGE\n                        path to initial image\n  --strength STRENGTH   how strong the initial image should be noised [0.0, 1.0]\n  --mask MASK           mask of the region to inpaint on the initial image\n  --output OUTPUT       output image name\n```\n\n## Examples\n\n### Example Text-To-Image\n```bash\npython demo.py --prompt \"Street-art painting of Emilia Clarke in style of Banksy, photorealism\"\n```\n\n### Example Image-To-Image\n```bash\npython demo.py --prompt \"Photo of Emilia Clarke with a bright red hair\" --init-image ./data/input.png --strength 0.5\n```\n\n### Example Inpainting\n```bash\npython demo.py --prompt \"Photo of Emilia Clarke with a bright red hair\" --init-image ./data/input.png --mask ./data/mask.png --strength 0.5\n```\n\n## Performance\n\n| CPU                                                | Time per iter | Total time |\n|----------------------------------------------------|---------------|------------|\n| AMD Ryzen 7 4800H                                  | 4.8 s/it      | 2.58 min   |\n| AMD Ryzen Threadripper 1900X                       | 5.34 s/it     | 2.58 min   |\n| Intel(R) Core(TM) i7-4790K  @ 4.00GHz              | 10.1 s/it     | 5.39 min   |\n| Intel(R) Core(TM) i5-8279U                         | 7.4 s/it      | 3.59 min   |\n| Intel(R) Core(TM) i5-8569U @ 2.8GHz (MBP13-2019)   | 6.17 s/it     | 3.23 min   |\n| Intel(R) Core(TM) i7-1165G7 @ 2.80GHz              | 7.4 s/it      | 3.59 min   |\n| Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 threads) | 2.9 s/it      | 1.54 min   |\n| Intel(R) Core(TM) i7-1280P @ 1.80GHz (6P/8E)       | 5.45 s/it     | 2.55 min   |\n| Intel(R) Xeon(R) Gold 6154 CPU @ 3.00GHz           | 1 s/it        | 33 s       |\n| Intel Arc A770M                                    | 6.64 it/s     | 7.53 s     |\n\n\n## Acknowledgements\n\n* Original implementation of Stable Diffusion: https://github.com/CompVis/stable-diffusion\n* diffusers library: https://github.com/huggingface/diffusers\n\n## Disclaimer\n\nThe authors are not responsible for the content generated using this project.\nPlease, don't use this project to produce illegal, harmful, offensive etc. content.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbes-dev%2Fstable_diffusion.openvino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbes-dev%2Fstable_diffusion.openvino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbes-dev%2Fstable_diffusion.openvino/lists"}