{"id":16107208,"url":"https://github.com/againstentropy/kanji","last_synced_at":"2025-09-15T12:04:21.880Z","repository":{"id":225219614,"uuid":"759583787","full_name":"AgainstEntropy/kanji","owner":"AgainstEntropy","description":"Chat with another civilization!","archived":false,"fork":false,"pushed_at":"2024-03-05T21:07:09.000Z","size":1957,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-10T19:15:23.594Z","etag":null,"topics":["aigc","diffusion-models","gradio"],"latest_commit_sha":null,"homepage":"","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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-18T23:31:19.000Z","updated_at":"2024-10-04T12:43:01.000Z","dependencies_parsed_at":"2024-02-29T21:55:09.510Z","dependency_job_id":null,"html_url":"https://github.com/AgainstEntropy/kanji","commit_stats":null,"previous_names":["againstentropy/kanji"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2Fkanji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2Fkanji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2Fkanji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgainstEntropy%2Fkanji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgainstEntropy","download_url":"https://codeload.github.com/AgainstEntropy/kanji/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221709084,"owners_count":16867659,"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":["aigc","diffusion-models","gradio"],"created_at":"2024-10-09T19:15:34.117Z","updated_at":"2024-10-27T17:10:42.015Z","avatar_url":"https://github.com/AgainstEntropy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kanji Streaming\n\n[![Hugging Face Space](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-space-yellow)](https://huggingface.co/spaces/AgainstEntropy/Kanji-Streaming)\n\nThis project aims to build an interesting dialogue system utilizing the characteristics of [StreamDiffusion](https://github.com/cumulo-autumn/StreamDiffusion).\n\nUsers are not talking to a common Chatbot in English, but in a kanji-like fake language, where responses are rendered with diffusion-based models.\n\nWe build this system based on [StreamDiffusionIO](https://github.com/AgainstEntropy/StreamDiffusionIO), a modified version of [StreamDiffusion](https://github.com/cumulo-autumn/StreamDiffusion) that supports rendering text streams into image streams.\n\nhttps://github.com/AgainstEntropy/kanji/assets/42559837/2a623697-94cd-406b-91bc-76c846bdc05a\n\n## News\n\n🔥 Mar 05, 2024 | Kanji Streaming is [reposted](https://x.com/enpitsu/status/1764915414063354236?s=20) by enpitsu (original author of Fake Kanji Generation) on X(twitter)!\n\n⬆️ Mar 04, 2024 | We update the [demo](https://github.com/AgainstEntropy/kanji-streaming-demo/blob/c931afed2ed2dab39781969921d53322d28793e4/app-mixtral.py) and it now allows to chat with [mistralai/Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) with HF InferenceClient, which also significantly saves GPU memory usage (from ~18.5G ➡️ ~5G). Also checkout the demo deployed on [Huggingface Space](https://huggingface.co/spaces/AgainstEntropy/Kanji-Streaming)!\n\n🔥 Mar 01, 2024 | Kanji Streaming is [reposted](https://x.com/Against_Entropy/status/1763305330027503856?s=20) by AK on X(twitter)!\n\n🚀 Feb 29, 2024 | Kanji Streaming is released!\n\n## Deploy\n\n### Step0: Clone this repo\n\n```shell\ngit clone https://github.com/AgainstEntropy/kanji.git\ncd kanji\n```\n\n### Step1: Setup environment\n\n```shell\nconda create -n kanji python=3.10\nconda activate kanji\npip install -r requirements.txt\n```\n\n### Step2: Install StreamDiffusionIO\n\n#### For Users\n\n```shell\npip install StreamDiffusionIO\n```\n\n#### For Developers\n\nTo pull the source code of [StreamDiffusionIO](https://github.com/AgainstEntropy/StreamDiffusionIO), one can either do\n\n```shell\ngit submodule update --init --recursive\n```\n\nor \n\n```shell\ngit clone https://github.com/AgainstEntropy/StreamDiffusionIO.git\n```\n\nThen install StreamDiffusionIO in editable mode\n\n```shell\npip install --editable StreamDiffusionIO/\n```\n\n\u003e [!TIP]\n\u003e See repository of [StreamDiffusionIO](https://github.com/AgainstEntropy/StreamDiffusionIO) for more details.\n\n### Step3: Download model weights\n\n- [Llama-2](https://huggingface.co/meta-llama)\n- [stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)\n    - [LoRA for kanji generation](https://huggingface.co/AgainstEntropy/kanji-lora-sd-v1-5): This LoRA enables sd-1.5 to generate kanji at resolution of 128 with text condition.\n    - [LCM-LoRA for kanji generation](https://huggingface.co/AgainstEntropy/kanji-lcm-lora-sd-v1-5): This LCM-LoRA turns the LDM into a LCM.\n\n### Step4: Serve with Gradio\n\nRun `git submodule update --init --recursive` to pull the code in `demo` folder.\n\nModify the arguments (e.g., model paths and `conda` installation path) in the launching scripts to match your case before running.\n\n#### Serve with Mixtral-8x7B-Instruct-v0.1 (HF InferenceClient)\n\n```shell\ncd demo\nsh run-app-mixtral.sh\n```\n\n#### Serve with Llama (run LLM locally)\n\n```shell\ncd demo\nsh run-kanji-local_llama.sh\n```\n\n\u003e [!TIP]\n\u003e It will take ~18.5G GPU memory when using Llama-2-7b-chat and Stable-Diffusion-v1-5.\n\n\n## Reproduce\n\nCheck out the [guide](./docs/REPRODUCE.md) on reproducing Kanji generation model used in this project.\n\n## Acknowledgements \u0026 References\n\n- Kanji Generation by [enpitsu](https://x.com/enpitsu/status/1610923494824628224?s=20)\n- [StreamDiffusion](https://github.com/cumulo-autumn/StreamDiffusion)\n- [Latent Consistency Models](https://github.com/huggingface/diffusers/tree/main/examples/consistency_distillation)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagainstentropy%2Fkanji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagainstentropy%2Fkanji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagainstentropy%2Fkanji/lists"}