Improve model card with pipeline tag, description, GitHub link, and usage

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +82 -3
README.md CHANGED
@@ -1,21 +1,100 @@
1
  ---
2
- license: mit
3
  datasets:
4
  - bayes-group-diffusion/GAS-teachers
 
5
  tags:
6
  - arxiv:2510.17699
 
7
  ---
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ## Citation
10
 
11
  ```bibtex
12
  @misc{oganov2025gasimprovingdiscretizationdiffusion,
13
- title={GAS: Improving Discretization of Diffusion ODEs via Generalized Adversarial Solver},
14
  author={Aleksandr Oganov and Ilya Bykov and Eva Neudachina and Mishan Aliev and Alexander Tolmachev and Alexander Sidorov and Aleksandr Zuev and Andrey Okhotin and Denis Rakitin and Aibek Alanov},
15
  year={2025},
16
  eprint={2510.17699},
17
  archivePrefix={arXiv},
18
  primaryClass={cs.CV},
19
- url={https://arxiv.org/abs/2510.17699},
20
  }
21
  ```
 
1
  ---
 
2
  datasets:
3
  - bayes-group-diffusion/GAS-teachers
4
+ license: mit
5
  tags:
6
  - arxiv:2510.17699
7
+ pipeline_tag: unconditional-image-generation
8
  ---
9
 
10
+ # GAS: Improving Discretization of Diffusion ODEs via Generalized Adversarial Solver
11
+
12
+ This repository contains the implementation of the **Generalized Adversarial Solver (GAS)**, presented in the paper [GAS: Improving Discretization of Diffusion ODEs via Generalized Adversarial Solver](https://huggingface.co/papers/2510.17699).
13
+
14
+ ![Teaser image](https://github.com/3145tttt/GAS/raw/main/docs/teaser_1920.jpg)
15
+
16
+ ## About
17
+ While diffusion models achieve state-of-the-art generation quality, they still suffer from computationally expensive sampling. Recent works address this issue with gradient-based optimization methods that distill a few-step ODE diffusion solver from the full sampling process, reducing the number of function evaluations from dozens to just a few. However, these approaches often rely on intricate training techniques and do not explicitly focus on preserving fine-grained details. In this paper, we introduce the **Generalized Solver (GS)**: a simple parameterization of the ODE sampler that does not require additional training tricks and improves quality over existing approaches. We further combine the original distillation loss with adversarial training, which mitigates artifacts and enhances detail fidelity. We call the resulting method the **Generalized Adversarial Solver (GAS)** and demonstrate its superior performance compared to existing solver training methods under similar resource constraints.
18
+
19
+ For more details and the official codebase, refer to the [GitHub repository](https://github.com/3145tttt/GAS).
20
+
21
+ ## Usage
22
+
23
+ This section demonstrates how to set up the environment and perform inference using the Generalized Adversarial Solver (GAS).
24
+
25
+ ### Setup Environment
26
+
27
+ First, set up your Python environment by creating a conda environment and installing dependencies:
28
+
29
+ ```bash
30
+ conda env create -f https://raw.githubusercontent.com/3145tttt/GAS/main/requirements.yml -n gas
31
+ conda activate gas
32
+ ```
33
+
34
+ ### Download Pretrained Models
35
+
36
+ All necessary data and pretrained models will be automatically downloaded by the script.
37
+
38
+ ```bash
39
+ bash scripts/downloads.sh
40
+ ```
41
+
42
+ ### Inference with trained GS/GAS
43
+
44
+ To generate images from a trained **GS/GAS** checkpoint, use the `generate.py` script. Replace `checkpoint_path` with the actual path to your downloaded or trained model checkpoint.
45
+
46
+ ```bash
47
+ # Example: Generate 50000 images using 2 GPUs and a trained checkpoint on CIFAR-10 with four sampling steps
48
+ torchrun --standalone --nproc_per_node=2 generate.py \
49
+ --config=configs/edm/cifar10.yaml \
50
+ --outdir=data/teachers/cifar10 \
51
+ --seeds=50000-99999 \
52
+ --batch=1024 \
53
+ --steps=4 \
54
+ --checkpoint_path=checkpoint_path
55
+ ```
56
+
57
+ **Note:** For a fair comparison and to avoid leakage of test seeds into the training dataset, we recommend using seeds 50000-99999 for all datasets except MS-COCO, which should use seeds 30000-59999.
58
+
59
+ ## Datasets
60
+
61
+ The teacher data is available at [Hugging Face Hub](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers). We provide SD datasets with both 30,000 and 6,000 samples specifying the teacher NFE. A list of datasets and related links are provided below:
62
+
63
+ | Dataset | Hugging Face Hub
64
+ | :-- | :--
65
+ | CIFAR-10 | [50k samples link](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/edm/cifar10/dataset.pkl)
66
+ | FFHQ | [50k samples link](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/edm/ffhq/dataset.pkl)
67
+ | AFHQv2 | [50k samples link](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/edm/afhqv2/dataset.pkl)
68
+ | LSUN-Bedrooms | [50k samples link](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/ldm/lsun_beds256/dataset.pkl)
69
+ | ImageNet | [50k samples link](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/ldm/cin256-v2/dataset.pkl)
70
+ | Stable diffusion | NFE=5: [6k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=5/dataset_6k.pkl), [30k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=5/dataset_30k.pkl); \
71
+ NFE=6: [6k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=6/dataset_6k.pkl), [30k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=6/dataset_30k.pkl); \
72
+ NFE=7: [6k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=7/dataset_6k.pkl), [30k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=7/dataset_30k.pkl); \
73
+ NFE=8: [6k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=8/dataset_6k.pkl), [30k samples](https://huggingface.co/datasets/bayes-group-diffusion/GAS-teachers/blob/main/sd-v1/nfe=8/dataset_30k.pkl);
74
+
75
+ ## Pre-trained models
76
+
77
+ Pre-trained **GS** and **GAS** checkpoints are available at [Hugging Face Hub](https://huggingface.co/bayes-group-diffusion/GAS-students). A list of datasets and related links are provided below:
78
+
79
+ | Dataset | Hugging Face Hub
80
+ | :-- | :--
81
+ | CIFAR-10 | [link](https://huggingface.co/bayes-group-diffusion/GAS-students/tree/main/edm/cifar10)
82
+ | FFHQ | [link](https://huggingface.co/bayes-group-diffusion/GAS-students/tree/main/edm/ffhq)
83
+ | AFHQv2 | [link](https://huggingface.co/bayes-group-diffusion/GAS-students/tree/main/edm/afhqv2)
84
+ | LSUN-Bedrooms | [link](https://huggingface.co/bayes-group-diffusion/GAS-students/tree/main/ldm/lsun_beds256)
85
+ | ImageNet | [link](https://huggingface.co/bayes-group-diffusion/GAS-students/tree/main/ldm/cin256-v2)
86
+ | Stable diffusion | [link](https://huggingface.co/bayes-group-diffusion/GAS-students/tree/main/sd-v1)
87
+
88
  ## Citation
89
 
90
  ```bibtex
91
  @misc{oganov2025gasimprovingdiscretizationdiffusion,
92
+ title={GAS: Improving Discretization of Diffusion ODEs via Generalized Adversarial Solver},
93
  author={Aleksandr Oganov and Ilya Bykov and Eva Neudachina and Mishan Aliev and Alexander Tolmachev and Alexander Sidorov and Aleksandr Zuev and Andrey Okhotin and Denis Rakitin and Aibek Alanov},
94
  year={2025},
95
  eprint={2510.17699},
96
  archivePrefix={arXiv},
97
  primaryClass={cs.CV},
98
+ url={https://arxiv.org/abs/2510.17699},
99
  }
100
  ```