{"id":16599933,"url":"https://github.com/dirmeier/denoising-diffusion-operators","last_synced_at":"2025-03-08T10:59:07.312Z","repository":{"id":231937359,"uuid":"769680920","full_name":"dirmeier/denoising-diffusion-operators","owner":"dirmeier","description":"Denoising diffusion operators in Flax","archived":false,"fork":false,"pushed_at":"2024-08-25T15:15:03.000Z","size":2701,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T06:45:45.925Z","etag":null,"topics":["denoising-diffusion-operator","flax","jax","python","score-based-generative-modeling"],"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/dirmeier.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":"2024-03-09T18:52:32.000Z","updated_at":"2024-08-25T15:14:47.000Z","dependencies_parsed_at":"2024-04-06T23:28:20.927Z","dependency_job_id":"23764acf-848c-4a78-8252-73d2c0aad69c","html_url":"https://github.com/dirmeier/denoising-diffusion-operators","commit_stats":null,"previous_names":["dirmeier/denoising-diffusion-operators"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdenoising-diffusion-operators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdenoising-diffusion-operators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdenoising-diffusion-operators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdenoising-diffusion-operators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirmeier","download_url":"https://codeload.github.com/dirmeier/denoising-diffusion-operators/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242538984,"owners_count":20145882,"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":["denoising-diffusion-operator","flax","jax","python","score-based-generative-modeling"],"created_at":"2024-10-12T00:13:01.651Z","updated_at":"2025-03-08T10:59:07.290Z","avatar_url":"https://github.com/dirmeier.png","language":"Python","readme":"# Denoising diffusion operators\n\n[![status](http://www.repostatus.org/badges/latest/concept.svg)](http://www.repostatus.org/#concept)\n[![ci](https://github.com/dirmeier/denoising-diffusion-operators/actions/workflows/ci.yaml/badge.svg)](https://github.com/dirmeier/denoising-diffusion-operators/actions/workflows/ci.yaml)\n\n\u003e Implementation of 'Score-based Diffusion Models in Function Space'\n\n## About\n\nThis repository implements the method, denoising diffusion operator (DDO), proposed in [Score-based Diffusion Models in Function Space](https://arxiv.org/abs/2302.07400), i.e.,\na function-space version of diffusion probabilistic models, using JAX and Flax.\n\n\u003e [!IMPORTANT]\n\u003e The implementation does not strictly follow the experimental setup in the paper (since the paper itself uses a different one for each experiment).\n\u003e Specifically, the U-net neural operator ([U-NO](https://arxiv.org/abs/2204.11127)) as well as the sampling are customized and simplified.\n\u003e Our U-NO implementation just uses spectral convolutions for up- and down-sampling of input dimensions.\n\u003e We use the VP-parameterization of [DDPM](https://arxiv.org/abs/2006.11239); hence we don't use the score-matching loss in [NCSN](https://arxiv.org/abs/1907.05600) but a conventional SSE loss.\n\u003e We consequently also don't use Langevin dynamics for sampling, but the sampling proposed in [DDIM](https://arxiv.org/abs/2010.02502).\n\u003e\n\u003e If you find bugs, please open an issue and report them.\n\n## Example usage\n\nThe `experiments` folder contains a use case on MNIST-SDF. For training on 32x32-dimensional images from the MNIST-SDF dataset, call:\n\n```bash\ncd experiments/mnist_sdf\npython main.py \\\n  --config=config.py \\\n  --mode=train \\\n  --model=\u003cuno|unet\u003e \\\n  --dataset=mnist_sdf \\\n  --workdir=\u003cdir\u003e\n```\n\nThen, sample images via:\n\n```bash\ncd experiments/mnist_sdf\npython main.py \\\n  --config=config.py \\\n  --mode=sample \\\n  --model=\u003cuno|unet\u003e \\\n  --dataset=mnist_sdf \\\n  --workdir=\u003cdir\u003e\n```\n\nBelow are DDIM-sampled images from the DDO when either a UNet or a UNO is used as score model (a DDO with a UNet is just a DDPM). The UNet parameterization yields high-quality results already after\n20 epochs or so. The UNO works worse than the UNet when 32x32-dimensional images are sampled and takes significantly longer to train. When sampling 64x64-dimensional images it mainly produces noise.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cdiv\u003eUNet 32x32\u003c/div\u003e\n  \u003cimg src=\"experiments/mnist_sdf/figures/mnist_sdf-unet-32x32.png\" width=\"750\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cdiv\u003eUNO 32x32\u003c/div\u003e\n  \u003cimg src=\"experiments/mnist_sdf/figures/mnist_sdf-uno-32x32.png\" width=\"750\"\u003e\n\u003c/div\u003e\n\n\u003cdiv  align=\"center\"\u003e\n  \u003cdiv\u003eUNO 64x64\u003c/div\u003e\n  \u003cimg src=\"experiments/mnist_sdf/figures/mnist_sdf-uno-64x64.png\" width=\"750\"\u003e\n\u003c/div\u003e\n\n## Installation\n\nTo install the latest GitHub \u003cTAG\u003e, just call the following on the command line:\n\n```bash\npip install git+https://github.com/dirmeier/ddo@\u003cTAG\u003e\n```\n\n## Author\n\nSimon Dirmeier \u003ca href=\"mailto:sfyrbnd @ pm me\"\u003esfyrbnd @ pm me\u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirmeier%2Fdenoising-diffusion-operators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirmeier%2Fdenoising-diffusion-operators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirmeier%2Fdenoising-diffusion-operators/lists"}