← 开源
LTH14

fractalgen

PyTorch implementation of FractalGen https://arxiv.org/abs/2502.17437

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+124 小时新增 Star+0.1%
1.25k
Star
66
Fork
+-1
本周
1
贡献者
创建于 2025-02-18 · 更新于 2026-10-15 · 今日第 5696 名
主要开发者
LTH14

LTH14/fractalgen 排名第 5,696,有 1,247 个星标。

同类别比较

LTH14/fractalgen 排名第 5,696,此处有 8 个同类条目;unitreerobotics/unitree_mujoco 排名第 5,698。

同类别比较
名称排名指标
Tencent-Hunyuan/SRPO5,666
语言:
Python
星标数:
1,280
分叉数:
43
简介:
Directly Aligning the Full Diffusion Trajectory with Fine-Grained Human Preference
EthicalML/xai5,674
语言:
Python
星标数:
1,268
分叉数:
189
简介:
XAI - An eXplainability toolbox for machine learning
JonathonLuiten/TrackEval5,679
语言:
Python
星标数:
1,264
分叉数:
327
简介:
HOTA (and other) evaluation metrics for Multi-Object Tracking (MOT).
MyoHub/myosuite5,684
语言:
Python
星标数:
1,258
分叉数:
178
简介:
MyoSuite is a collection of environments/tasks to be solved by musculoskeletal models simulated with the MuJoCo physics engine and wrapped in the OpenAI gym API.
unitreerobotics/unitree_mujoco5,698
语言:
C++
星标数:
1,247
分叉数:
420
brian-team/brian25,700
语言:
Python
星标数:
1,246
分叉数:
306
简介:
Brian is a free, open source simulator for spiking neural networks.
stereolabs/zed-sdk5,706
语言:
C++
星标数:
1,242
分叉数:
507
简介:
⚡️The spatial perception framework for rapidly building smart robots and spaces
datawhalechina/torch-rechub5,714
语言:
Jupyter Notebook
星标数:
1,231
分叉数:
158
简介:
A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
关键词Image production
星标数1,247
分叉数66
贡献者1
创建日期2025-02-18
更新日期2026-10-15
1 天星标数1
7 天星标数-1
排名5,696
上次排名10,944
排名变化5,248
7 天星标排名17,227
上次 7 天星标排名18,281
7 天星标排名变化1,054
总星标排名9,393
上次总星标排名9,393
总星标排名变化0
国家USA
README 摘录

Fractal Generative Models This is a PyTorch/GPU implementation of the paper Fractal Generative Models: FractalGen enables pixel-by-pixel high-resolution image generation for the first time. This repo contains: 🪐 A simple PyTorch implementation of Fractal Generative Model. ⚡️ Pre-trained pixel-by-pixel generation models trained on ImageNet 64x64 and 256x256. 💥 A self-contained Colab notebook for running pre-trained models tasks. 🛸 A training and evaluation script using PyTorch DDP. Preparation Dataset Download ImageNet dataset, and place it in

your . 9 | 432M | | FractalMAR-Base (IN256) | 11. 3 | 186M | | FractalMAR-Large (IN256) | 7. 9 | 438M | | FractalMAR-Huge (IN256) | 6. 9 | 848M | Usage Demo Run our interactive visualization demo using Colab notebook! Training The below training scripts have been tested on 4x8 H100 GPUs. Example script for training FractalAR on ImageNet 64x64 for 800 epochs: Example script for training FractalMAR on ImageNet 64x64 for 800 epochs: Example script for training FractalMAR-L on ImageNet 256x256 for 800 epochs: Evaluation Evaluate pre

-trained FractalAR on ImageNet 64x64 unconditional likelihood estimation (single GPU): Evaluate pre-trained FractalMAR on ImageNet 64x64 unconditional likelihood estimation (single GPU): Evaluate pre-trained FractalAR on ImageNet 64x64 class-conditional generation: Evaluate pre-trained FractalMAR on ImageNet 64x64 class-conditional generation: Evaluate pre-trained FractalMAR-Huge on ImageNet 256x256 class-conditional generation: For ImageNet 256x256, the optimal classifier-free guidance values that achieve the best FID are for FractalMAR-Base and for FractalMAR-Large. Acknowledgements We thank Google TPU

Research Cloud (TRC) for granting us access to TPUs, and Google Cloud Platform for supporting GPU resources. Contact If you have any questions, feel free to contact me through email (tianhong@mit.

常见问题

记录了多少星标和分叉?

LTH14/fractalgen 有 1,247 个星标和 66 个分叉。

仓库排名是多少?

LTH14/fractalgen 排名第 5,696。

记录的语言和类别是什么?

LTH14/fractalgen 有 1,247 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

LTH14/fractalgen 与 unitreerobotics/unitree_mujoco 比较,后者排名第 5,698,有 1,247 个星标。

README

Fractal Generative Models

 

This is a PyTorch/GPU implementation of the paper Fractal Generative Models:

@article{li2025fractal,
  title={Fractal Generative Models},
  author={Li, Tianhong and Sun, Qinyi and Fan, Lijie and He, Kaiming},
  journal={arXiv preprint arXiv:2502.17437},
  year={2025}
}

FractalGen enables pixel-by-pixel high-resolution image generation for the first time. This repo contains:

Preparation

Dataset

Download ImageNet dataset, and place it in your IMAGENET_PATH.

Installation

Download the code:

git clone https://github.com/LTH14/fractalgen.git
cd fractalgen

A suitable conda environment named fractalgen can be created and activated with:

conda env create -f environment.yaml
conda activate fractalgen

Download pre-trained models:

python util/download.py

For convenience, our pre-trained models can be downloaded directly here as well:

Model FID-50K Inception Score #params
FractalAR (IN64) 5.30 56.8 432M
FractalMAR (IN64) 2.72 87.9 432M
FractalMAR-Base (IN256) 11.80 274.3 186M
FractalMAR-Large (IN256) 7.30 334.9 438M
FractalMAR-Huge (IN256) 6.15 348.9 848M

Usage

Demo

Run our interactive visualization demo using Colab notebook!

Training

The below training scripts have been tested on 4x8 H100 GPUs.

Example script for training FractalAR on ImageNet 64x64 for 800 epochs:

torchrun --nproc_per_node=8 --nnodes=4 --node_rank=${NODE_RANK} --master_addr=${MASTER_ADDR} --master_port=${MASTER_PORT} \
main_fractalgen.py \
--model fractalar_in64 --img_size 64 --num_conds 1 \
--batch_size 64 --eval_freq 40 --save_last_freq 10 \
--epochs 800 --warmup_epochs 40 \
--blr 5.0e-5 --weight_decay 0.05 --attn_dropout 0.1 --proj_dropout 0.1 --lr_schedule cosine \
--gen_bsz 256 --num_images 8000 --num_iter_list 64,16 --cfg 11.0 --cfg_schedule linear --temperature 1.03 \
--output_dir ${OUTPUT_DIR} --resume ${OUTPUT_DIR} \
--data_path ${IMAGENET_PATH} --grad_checkpointing --online_eval

Example script for training FractalMAR on ImageNet 64x64 for 800 epochs:

torchrun --nproc_per_node=8 --nnodes=4 --node_rank=${NODE_RANK} --master_addr=${MASTER_ADDR} --master_port=${MASTER_PORT} \
main_fractalgen.py \
--model fractalmar_in64 --img_size 64 --num_conds 5 \
--batch_size 64 --eval_freq 40 --save_last_freq 10 \
--epochs 800 --warmup_epochs 40 \
--blr 5.0e-5 --weight_decay 0.05 --attn_dropout 0.1 --proj_dropout 0.1 --lr_schedule cosine \
--gen_bsz 256 --num_images 8000 --num_iter_list 64,16 --cfg 6.5 --cfg_schedule linear --temperature 1.02 \
--output_dir ${OUTPUT_DIR} --resume ${OUTPUT_DIR} \
--data_path ${IMAGENET_PATH} --grad_checkpointing --online_eval

Example script for training FractalMAR-L on ImageNet 256x256 for 800 epochs:

torchrun --nproc_per_node=8 --nnodes=4 --node_rank=${NODE_RANK} --master_addr=${MASTER_ADDR} --master_port=${MASTER_PORT} \
main_fractalgen.py \
--model fractalmar_large_in256 --img_size 256 --num_conds 5 --guiding_pixel \
--batch_size 32 --eval_freq 40 --save_last_freq 10 \
--epochs 800 --warmup_epochs 40 \
--blr 5.0e-5 --weight_decay 0.05 --attn_dropout 0.1 --proj_dropout 0.1 --lr_schedule cosine \
--gen_bsz 256 --num_images 8000 --num_iter_list 64,16,16 --cfg 21.0 --cfg_schedule linear --temperature 1.1 \
--output_dir ${OUTPUT_DIR} --resume ${OUTPUT_DIR} \
--data_path ${IMAGENET_PATH} --grad_checkpointing --online_eval

Evaluation

Evaluate pre-trained FractalAR on ImageNet 64x64 unconditional likelihood estimation (single GPU):

torchrun --nproc_per_node=1 --nnodes=1 --node_rank=0 \
main_fractalgen.py \
--model fractalar_in64 --img_size 64 --num_conds 1 \
--nll_bsz 128 --nll_forward_number 1 \
--output_dir pretrained_models/fractalar_in64 \
--resume pretrained_models/fractalar_in64 \
--data_path ${IMAGENET_PATH} --seed 0 --evaluate_nll

Evaluate pre-trained FractalMAR on ImageNet 64x64 unconditional likelihood estimation (single GPU):

torchrun --nproc_per_node=1 --nnodes=1 --node_rank=0 \
main_fractalgen.py \
--model fractalmar_in64 --img_size 64 --num_conds 5 \
--nll_bsz 128 --nll_forward_number 10 \
--output_dir pretrained_models/fractalmar_in64 \
--resume pretrained_models/fractalmar_in64 \
--data_path ${IMAGENET_PATH} --seed 0 --evaluate_nll

Evaluate pre-trained FractalAR on ImageNet 64x64 class-conditional generation:

torchrun --nproc_per_node=8 --nnodes=1 --node_rank=0 \
main_fractalgen.py \
--model fractalar_in64 --img_size 64 --num_conds 1 \
--gen_bsz 512 --num_images 50000 \
--num_iter_list 64,16 --cfg 11.0 --cfg_schedule linear --temperature 1.03 \
--output_dir pretrained_models/fractalar_in64 \
--resume pretrained_models/fractalar_in64 \
--data_path ${IMAGENET_PATH} --seed 0 --evaluate_gen

Evaluate pre-trained FractalMAR on ImageNet 64x64 class-conditional generation:

torchrun --nproc_per_node=8 --nnodes=1 --node_rank=0 \
main_fractalgen.py \
--model fractalmar_in64 --img_size 64 --num_conds 5 \
--gen_bsz 1024 --num_images 50000 \
--num_iter_list 64,16 --cfg 6.5 --cfg_schedule linear --temperature 1.02 \
--output_dir pretrained_models/fractalmar_in64 \
--resume pretrained_models/fractalmar_in64 \
--data_path ${IMAGENET_PATH} --seed 0 --evaluate_gen

Evaluate pre-trained FractalMAR-Huge on ImageNet 256x256 class-conditional generation:

torchrun --nproc_per_node=8 --nnodes=1 --node_rank=0 \
main_fractalgen.py \
--model fractalmar_huge_in256 --img_size 256 --num_conds 5 --guiding_pixel \
--gen_bsz 1024 --num_images 50000 \
--num_iter_list 64,16,16 --cfg 19.0 --cfg_schedule linear --temperature 1.1 \
--output_dir pretrained_models/fractalmar_huge_in256 \
--resume pretrained_models/fractalmar_huge_in256 \
--data_path ${IMAGENET_PATH} --seed 0 --evaluate_gen

For ImageNet 256x256, the optimal classifier-free guidance values --cfg that achieve the best FID are 29.0 for FractalMAR-Base and 21.0 for FractalMAR-Large.

Acknowledgements

We thank Google TPU Research Cloud (TRC) for granting us access to TPUs, and Google Cloud Platform for supporting GPU resources.

Contact

If you have any questions, feel free to contact me through email (tianhong@mit.edu). Enjoy!

排名相邻
同类项目