{"id":28311845,"url":"https://github.com/uofgravity/glasflow","last_synced_at":"2025-12-12T00:58:36.357Z","repository":{"id":37900504,"uuid":"373898190","full_name":"uofgravity/glasflow","owner":"uofgravity","description":"Normalising flows implemented using nflows","archived":false,"fork":false,"pushed_at":"2024-10-10T16:53:01.000Z","size":807,"stargazers_count":27,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-01T01:13:35.506Z","etag":null,"topics":["normalizing-flows","pytorch","torch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uofgravity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2021-06-04T16:18:05.000Z","updated_at":"2025-03-11T20:08:36.000Z","dependencies_parsed_at":"2024-06-07T11:08:10.694Z","dependency_job_id":"83412eb2-c070-4185-8f40-036e46843d2d","html_url":"https://github.com/uofgravity/glasflow","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/uofgravity/glasflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uofgravity%2Fglasflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uofgravity%2Fglasflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uofgravity%2Fglasflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uofgravity%2Fglasflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uofgravity","download_url":"https://codeload.github.com/uofgravity/glasflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uofgravity%2Fglasflow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261452858,"owners_count":23160403,"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":["normalizing-flows","pytorch","torch"],"created_at":"2025-05-24T14:17:38.551Z","updated_at":"2025-10-29T20:40:00.157Z","avatar_url":"https://github.com/uofgravity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7108558.svg)](https://doi.org/10.5281/zenodo.7108558)\n[![PyPI](https://img.shields.io/pypi/v/glasflow)](https://pypi.org/project/glasflow/)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/glasflow.svg)](https://anaconda.org/conda-forge/glasflow)\n\n# Glasflow\n\nglasflow is a Python library containing a collection of [Normalizing flows](https://arxiv.org/abs/1912.02762) using [PyTorch](https://pytorch.org). It builds upon [nflows](https://github.com/bayesiains/nflows).\n\n## Installation\n\nglasflow is available to install via `pip`:\n\n```shell\npip install glasflow\n```\n\nor via `conda`:\n\n```shell\nconda install glasflow -c conda-forge\n```\n\n## PyTorch\n\n**Important:** `glasflow` supports using CUDA devices but it is not a requirement and in most uses cases it provides little to no benefit.\n\nBy default the version of PyTorch installed by `pip` or `conda` will not necessarily match the drivers on your system, to install a different version with the correct CUDA support see the PyTorch homepage for instructions: \u003chttps://pytorch.org/\u003e.\n\n## Usage\n\nTo define a RealNVP flow:\n\n```python\nfrom glasflow import RealNVP\n\n# define RealNVP flow. Change hyperparameters as necessary.\nflow = RealNVP(\n    n_inputs=2,\n    n_transforms=5,\n    n_neurons=32,\n    batch_norm_between_transforms=True\n)\n```\n\nPlease see [glasflow/examples](https://github.com/uofgravity/glasflow/tree/main/examples) for a typical training regime example.\n\n## nflows\n\nglasflow uses a fork of nflows which is included as submodule in glasflow and can used imported as follows:\n\n```python\nimport glasflow.nflows as nflows\n```\n\nIt contains various bugfixes which, as of writing this, are not included in a current release of `nflows`.\n\n### Using standard nflows\n\nThere is also the option to use an independent install of nflows (if installed) by setting an environment variable.\n\n```shell\nexport  GLASFLOW_USE_NFLOWS=True\n```\n\nAfter setting this variable `glasflow.nflows` will point to the version of nflows installed in the current python environment.\n\n**Note:** this must be set prior to importing glasflow.\n\n## Contributing\n\nPull requests are welcome. You can review the contribution guidelines [here](https://github.com/uofgravity/glasflow/blob/main/CONTRIBUTING.md). For major changes, please open an issue first to discuss what you would like to change.\n\n## Citing\n\nIf you use glasflow in your work please cite [our DOI](https://doi.org/10.5281/zenodo.7108558). We also recommend you also cite nflows following the guidelines in the [nflows readme](https://github.com/uofgravity/nflows#citing-nflows).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuofgravity%2Fglasflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuofgravity%2Fglasflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuofgravity%2Fglasflow/lists"}