{"id":30620297,"url":"https://github.com/EricLBuehler/diffusion-rs","last_synced_at":"2025-08-30T13:10:31.203Z","repository":{"id":271326261,"uuid":"897647576","full_name":"EricLBuehler/diffusion-rs","owner":"EricLBuehler","description":"Blazingly fast inference of diffusion models.","archived":false,"fork":false,"pushed_at":"2025-04-01T02:08:34.000Z","size":65688,"stargazers_count":113,"open_issues_count":9,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-25T23:18:41.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/EricLBuehler.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,"zenodo":null}},"created_at":"2024-12-03T01:49:10.000Z","updated_at":"2025-08-20T08:17:38.000Z","dependencies_parsed_at":"2025-04-04T12:10:32.342Z","dependency_job_id":"2d96bdea-5479-434c-a779-171e54c4c8b9","html_url":"https://github.com/EricLBuehler/diffusion-rs","commit_stats":null,"previous_names":["ericlbuehler/diffuse-rs","ericlbuehler/diffusion-rs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/EricLBuehler/diffusion-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLBuehler%2Fdiffusion-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLBuehler%2Fdiffusion-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLBuehler%2Fdiffusion-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLBuehler%2Fdiffusion-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EricLBuehler","download_url":"https://codeload.github.com/EricLBuehler/diffusion-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLBuehler%2Fdiffusion-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272853115,"owners_count":25004201,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-08-30T13:10:25.585Z","updated_at":"2025-08-30T13:10:31.187Z","avatar_url":"https://github.com/EricLBuehler.png","language":"Rust","funding_links":[],"categories":["Neural Networks"],"sub_categories":[],"readme":"\u003ca name=\"top\"\u003e\u003c/a\u003e\n\u003ch1 align=\"center\"\u003e\n  diffusion-rs\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\nBlazingly fast inference of diffusion models.\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n| \u003ca href=\"https://ericlbuehler.github.io/diffusion-rs/diffusion_rs_core/\"\u003e\u003cb\u003eLatest Rust Documentation\u003c/b\u003e\u003c/a\u003e | \u003ca href=\"https://ericlbuehler.github.io/diffusion-rs/pyo3/diffusion_rs.html\"\u003e\u003cb\u003eLatest Python Documentation\u003c/b\u003e\u003c/a\u003e | \u003ca href=\"https://discord.gg/DRcvs6z5vu\"\u003e\u003cb\u003eDiscord\u003c/b\u003e\u003c/a\u003e |\n\u003c/p\u003e\n\n\n## Features\n- Quantization\n  - `bitsandbytes` format (fp4, nf4, and int8)\n  - `GGUF` (2-8 bit quantization)\n- Easy: Strong support for running [🤗 DDUF](https://huggingface.co/DDUF) models.\n- Strong Apple Silicon support: support for the Metal, Accelerate, and ARM NEON frameworks\n- Support for NVIDIA GPUs with CUDA\n- AVX support for x86 CPUs\n- Allow acceleration of models larger than the total VRAM size with offloading\n\nPlease do not hesitate to contact us with feature requests via [Github issues](https://github.com/EricLBuehler/diffusion-rs/issues)!\n\n## Upcoming features\n- 🚧 LoRA support\n- 🚧 CPU + GPU inference with automatic offloading to allow partial acceleration of models larger than the total VRAM\n\n## Installation\nCheck out the [installation guide](INSTALL.md) for details about installation.\n\n## Examples\nAfter [installing](#installation), you can try out these examples!\n\n\u003e Download the DDUF file here: `wget https://huggingface.co/DDUF/FLUX.1-dev-DDUF/resolve/main/FLUX.1-dev-Q4-bnb.dduf`\n\n**CLI:**\n```bash\ndiffusion_rs_cli --scale 3.5 --num-steps 50 dduf -f FLUX.1-dev-Q4-bnb.dduf\n```\n\nMore CLI examples [here](diffusion_rs_cli/README.md).\n\n**Python:**\n\nMore Python examples [here](diffusion_rs_py/examples).\n\n```py\nfrom diffusion_rs import DiffusionGenerationParams, ModelSource, Pipeline\nfrom PIL import Image\nimport io\n\npipeline = Pipeline(source=ModelSource.DdufFile(\"FLUX.1-dev-Q4-bnb.dduf\"))\n\nimage_bytes = pipeline.forward(\n    prompts=[\"Draw a picture of a sunrise.\"],\n    params=DiffusionGenerationParams(\n        height=720, width=1280, num_steps=50, guidance_scale=3.5\n    ),\n)\n\nimage = Image.open(io.BytesIO(image_bytes[0]))\nimage.show()\n```\n\n**Rust crate:**\n\nExamples with the Rust crate: [here](diffusion_rs_examples/examples).\n\n```rust\nuse std::time::Instant;\n\nuse diffusion_rs_core::{DiffusionGenerationParams, ModelSource, ModelDType, Offloading, Pipeline, TokenSource};\nuse tracing::level_filters::LevelFilter;\nuse tracing_subscriber::EnvFilter;\n\nlet filter = EnvFilter::builder()\n    .with_default_directive(LevelFilter::INFO.into())\n    .from_env_lossy();\ntracing_subscriber::fmt().with_env_filter(filter).init();\n\nlet pipeline = Pipeline::load(\n    ModelSource::dduf(\"FLUX.1-dev-Q4-bnb.dduf\")?,\n    false,\n    TokenSource::CacheToken,\n    None,\n    None,\n    \u0026ModelDType::Auto,\n)?;\n\nlet start = Instant::now();\n\nlet images = pipeline.forward(\n    vec![\"Draw a picture of a sunrise.\".to_string()],\n    DiffusionGenerationParams {\n        height: 720,\n        width: 1280,\n        num_steps: 50,\n        guidance_scale: 3.5,\n    },\n)?;\n\nlet end = Instant::now();\nprintln!(\"Took: {:.2}s\", end.duration_since(start).as_secs_f32());\n\nimages[0].save(\"image.png\")?;\n```\n\n## Support matrix\n| Model | Supports DDUF | Supports quantized DDUF |\n| -- | -- | -- |\n| FLUX.1 Dev/Schnell | ✅ | ✅ |\n\n## Contributing\n\n- Anyone is welcome to contribute by opening PRs\n  - See [good first issues](https://github.com/EricLBuehler/diffusion-rs/labels/good%20first%20issue) for a starting point!\n- Collaborators will be invited based on past contributions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEricLBuehler%2Fdiffusion-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEricLBuehler%2Fdiffusion-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEricLBuehler%2Fdiffusion-rs/lists"}