Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
| Date | Stars |
|---|---|
| 2026-07-24 | 779 |
| 2026-07-25 | 779 |
| 2026-07-28 | 779 |
| 2026-07-30 | 779 |
| 2026-08-06 | 779 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Anycost GAN ### [video](https://youtu.be/_yEziPl9AkM) | [paper](https://arxiv.org/abs/2103.03243) | [website](https://hanlab18.mit.edu/projects/anycost-gan/) [](https://colab.research.google.com/github/mit-han-lab/anycost-gan/blob/master/notebooks/intro_colab.ipynb) [Anycost GANs for Interactive Image Synthesis and Editing](https://arxiv.org/abs/2103.03243) [Ji Lin](http://linji.me/), [Richard Zhang](https://richzhang.github.io/), Frieder Ganz, [Song Han](https://songhan.mit.edu/), [Jun-Yan Zhu](https://www.cs.cmu.edu/~junyanz/) MIT, Adobe Research, CMU In CVPR 2021  Anycost GAN generates consistent outputs under various computational budgets. ## Demo <a href="https://youtu.be/_yEziPl9AkM?t=90"><img src='assets/figures/demo.gif' width=600></a> Here, we can use the Anycost generator for **interactive image editing**. A full generator takes **~3s** to render an image, which is too slow for editing. While with Anycost generator, we can provide a visually similar preview at **5x faster speed**. After adjustment, we hit the "Finalize" button to synthesize the high-quality final output. Check [here](https://youtu.be/_yEziPl9AkM?t=90) for the full demo. ## Overview Anycost generators can be run at *diverse computation costs* by using different *channel* and *resolution* configurations. Sub-generators achieve high output consistency compared to the full generator, providing a fast preview.  With (1) Sampling-based multi-resolution training, (2) adaptive-channel training, and (3) generator-conditioned discriminator, we achieve high image quality and consistency at different resolutions and channels.  ## Results Anycost GAN (uniform channel version) supports 4 resolutions and 4 channel ratios, producing visually consistent images with different image fidelity.  The consistency retains during image projection and editing:   ## Usage ### Getting Started - Clone this repo: ```bash git clone https://github.com/mit-han-lab/anycost-gan.git cd anycost-gan ``` - Install PyTorch 1.7 and other dependeinces. We recommend setting up the environment using Anaconda: `conda env create -f environment.yml` ### Introduction Notebook We provide a jupyter notebook example to show how to use the anycost generator for image synthesis at diverse costs: `notebooks/intro.ipynb`. We also provide a colab version of the notebook: [](https://colab.research.google.com/github/mit-han-lab/anycost-gan/blob/master/notebooks/intro_colab.ipynb). Be sure to select the GPU as the accelerator in runtime options. ### Interactive Demo We provide an interactive demo showing how we can use anycost GAN to enable interactive image editing. To run the demo: ```bash python demo.py ``` If your computer contains a CUDA GPU, try running with: ```bash FORCE_NATIVE=1 python demo.py ``` You can find a video recording of the demo [here](https://youtu.be/_yEziPl9AkM?t=90). ### Using Pre-trained Models To get the pre-trained generator, encoder, and editing directions, run: ```python import models pretrained_type = 'generator' # choosing from ['generator', 'encoder', 'boundary'] config_name = 'anycost-ffhq-config-f' # replace the config name for other models models.get_pretrained(pretrained_type, config=config_name) ``` We also provide the face attribute classifier (which is general for different generators) for computing the editing directions. You can get it by running: ```
Excerpt of 10,327 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:852c2a5922451396, topic:image-generation, topic:gan, readme:image editing
matched fp:852c2a5922451396, topic:deep-learning, topic:pytorch
matched fp:852c2a5922451396, topic:computer-vision