{"id":16107170,"url":"https://github.com/againstentropy/streamdiffusionio","last_synced_at":"2026-02-19T17:30:46.379Z","repository":{"id":225224673,"uuid":"763319388","full_name":"AgainstEntropy/StreamDiffusionIO","owner":"AgainstEntropy","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-04T20:25:25.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T03:15:59.704Z","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/AgainstEntropy.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-26T04:12:46.000Z","updated_at":"2024-10-04T20:25:17.000Z","dependencies_parsed_at":"2024-02-29T22:27:41.070Z","dependency_job_id":"f2e70438-6dae-46d6-848a-7ddf45b4c8ba","html_url":"https://github.com/AgainstEntropy/StreamDiffusionIO","commit_stats":null,"previous_names":["againstentropy/streamdiffusionio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AgainstEntropy/StreamDiffusionIO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2FStreamDiffusionIO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2FStreamDiffusionIO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2FStreamDiffusionIO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2FStreamDiffusionIO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgainstEntropy","download_url":"https://codeload.github.com/AgainstEntropy/StreamDiffusionIO/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2FStreamDiffusionIO/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29624441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-09T19:15:25.090Z","updated_at":"2026-02-19T17:30:46.364Z","avatar_url":"https://github.com/AgainstEntropy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StreamDiffusionIO\n\nStreamDiffusionIO's pipeline design is based on [StreamDiffusion](https://github.com/cumulo-autumn/StreamDiffusion), but especially allows using different text prompt on different samples in the denoising batch respectively but consistently.\n\n\nA natural application of StreamDiffusionIO is to render text streams into image streams, as in [Streaming Kanji](https://github.com/AgainstEntropy/kanji).\n\n## Features\n\n- [ ] Streaming with LDM\n- [x] Streaming with LCM\n\n\n## Installation\n\n### Create the Env\n\n```shell\nconda create -n StreamDiffusionIO python=3.10\nconda activate StreamDiffusionIO\n```\n\n### Install StreamDiffusionIO\n\n#### For Users\n\n```shell\nppip install StreamDiffusionIO\n```\n\n#### For Developers\n\n```shell\ngit clone https://github.com/AgainstEntropy/StreamDiffusionIO.git\npip install --editable ./StreamDiffusionIO/\n```\n\n### (Optional) Accelaration with `xformers`\n\n```shell\n# For user\npip install StreamDiffusionIO[xformers]\n\n# For dev\npip install -e '.[xformers]'\n```\n\nOr install `xformers` manually:\n\n```shell\npip install xformers --index-url https://download.pytorch.org/whl/cu124\n```\n\n## Quick Start\n\nStreamDiffusionIO is very similar to StreamDiffusion, but even more lightweight. One can use the pipeline with only a few lines of codes.\n\n```python\nimport torch\nfrom StreamDiffusionIO import LatentConsistencyModelStreamIO\n\ndevice = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n\nmodel_id_or_path = \"/path/to/stable-diffusion-v1-5\"\nlora_path = \"/path/to/lora/pytorch_lora_weights.safetensors\"\nlcm_lora_path = \"/path/to/lcm-lora/pytorch_lora_weights.safetensors\"\n\nstream = LatentConsistencyModelStreamIO(\n    model_id_or_path=model_id_or_path,\n    lcm_lora_path=lcm_lora_path,\n    lora_dict={lora_path: 1},\n    resolution=128,\n    device=device,\n)\n\ntext = \"Today I saw a beautiful sunset and it made me feel so happy.\"\nprompt_list = text.split()\n\n# to simulate a text stream\nfor prompt in prompt_list:\n    image, text = stream(prompt)  # stream returns None during warmup\n    if image is not None:\n        print(text)\n        display(image)\n\n# Continue to display the remaining images in the stream \nwhile True:\n    image, text = stream(prompt)\n    print(text)\n    display(image)\n    if stream.stop():\n        break\n```\n\nNote the `text` returnded from the `stream` is the corresponding text prompt used to generating the returned `image`.\nPlease follow the Jupyter notebooks in [examples](./examples/) to see details.\n\n\n## Acknowledgements \u0026 References\n\n- [StreamDiffusion](https://github.com/cumulo-autumn/StreamDiffusion)\n- [Latent Consistency Models](https://github.com/huggingface/diffusers/tree/main/examples/consistency_distillation)\n- [Latent Diffision Models](https://github.com/CompVis/latent-diffusion/tree/main)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagainstentropy%2Fstreamdiffusionio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagainstentropy%2Fstreamdiffusionio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagainstentropy%2Fstreamdiffusionio/lists"}