Practical overview
When it fits
Use it for local research or development workflows that need the Relay Diffusion method, particularly resolution transfer, sample generation, or evaluation of generated images.
Who it is for
- Researchers studying diffusion generation across resolutions.
- Developers who want to run or adapt the published PyTorch implementation.
- Teams preparing image datasets and evaluating generated samples.
Documented uses
- Generate high-resolution image samples from model checkpoints.
- Continue a diffusion-generation process at a new resolution from a low-resolution image or noise.
- Prepare image datasets in the repository's expected format.
- Evaluate generated samples with FID, sFID, Inception Score, precision and recall.
Requirements & limits
The implementation is publicly available on GitHub under the Apache-2.0 license.
- This is a code repository, not a hosted image-generation interface; working with it involves a local Python/PyTorch environment.
- The README's setup uses Conda and recommends Linux servers with Nvidia A100 GPUs, while noting that smaller per-GPU batches can work on less powerful GPUs.
- Generation requires first- and second-stage checkpoints for the documented two-stage command.
- Training data must be prepared in the repository's expected format; the README gives 64×64 and 256×256 dataset-preparation examples.
- The repository documents sample generation and quantitative evaluation as separate workflows.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare image data for training
Convert original image data into the repository's organized 64×64 or 256×256 dataset format.
Before you start
- A cloned RelayDiffusion repository and its Conda environment, activated as
rdm. - Original image data and a destination path for the output ZIP file.
- Data arranged in the format used by EDM; the README identifies CelebA-HQ and ImageNet as dataset examples.
Steps
Clone the repository and enter its directory.
Create and activate the Conda environment with
conda env create -f environment.ymlandconda activate rdm.Run the command below, substituting
256x256when that is the intended resolution.python dataset_tool.py --source=/path/to/original/data --dest=/path/to/output/data.zip --transform=center-crop --resolution=64x64
Expected outcome
An organized dataset ZIP for training at the selected resolution.
Guide limitations
- The guide covers data preparation only, not model training or generation.
- The README recommends Linux servers with Nvidia A100 GPUs; it also says smaller
--batch-gpuvalues can permit training and inference on less powerful GPUs.
Generate samples from two-stage checkpoints
Use both RDM sampler stages to write generated samples to an output directory.
Before you start
- A cloned repository with its Conda environment activated as
rdm. - First- and second-stage model checkpoints, with paths supplied to the generation script.
- A local output directory and a supported PyTorch execution environment.
Steps
Run
torchrun --standalone --nproc_per_node=1 generate.py --sampler_stages=both --outdir=/path/to/output/dir/ --network_first=/path/to/1st/ckpt --network_second=/path/to/2nd/ckpt, replacing the example paths with local paths.To request a range of generated images, set
--seed=[K]-[K+N-1]with a chosen starting seed and desired count.
Expected outcome
Generated image samples are written to the specified output directory.
Guide limitations
- The README gives a generation command but does not specify a universal hardware requirement for every run.
- Multi-GPU generation is supported in the documented workflow by setting
--nproc_per_nodeto the number of GPUs; resource needs depend on the run.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- zai-org/RelayDiffusion · Official homepage title · retained in its source language

