Nanosaur2 GAN VAE

A full-decoder VAE fine-tune of Nanosaur2-670M.

Updated release: nanosaur2_vae_gan.safetensors now contains the latest full-decoder run's best checkpoint at step 3,500 (EMA). It replaces the previous partial-decoder release under the same filename. The run was stopped at step 4,584; this release uses the earlier selected checkpoint.

Use in ComfyUI

Download nanosaur2_vae_gan.safetensors, put it in ComfyUI/models/vae/, and select it in Load Nanosaur2. If you downloaded the previous release, replace that file with this one.

This is the complete VAE, with the original Nanosaur2 state-dict format, 64 latent channels, and 16× spatial downsampling. It requires no new VAE node code. The encoder and latent normalization remain unchanged, so existing Nanosaur2 latents remain compatible.

For Nanosaur2 inpainting, the updated node package and adapter are available at Nanosaur2-Inpaint-ControlNet. Select this VAE in that workflow's loader to use the new decoder.

Training

  • Initialized from the previous partial-decoder GAN release.
  • Trained all decoder stages, approximately 41.6M parameters. The encoder and latent normalization were frozen.
  • Dataset: 14,595 training images and 64 held-out images from two local illustration collections. Training images are not distributed here.
  • Random 512×512 crops, batch size 1, gradient accumulation 4.
  • Generator learning rate 1e-5; discriminator learning rate 5e-5.
  • Reconstruction and VGG LPIPS losses, plus a two-scale PatchGAN objective with spectral normalization and lazy R1 regularization. GAN weight ramps to 0.05.

The discriminator is used only during training and is not needed for inference. See training_config.json for the selected checkpoint's provenance and settings.

Evaluation against the previous release

The actual exported checkpoints were evaluated on identical held-out images and latents. Lower LPIPS is better.

Resolution Images Previous LPIPS New LPIPS Relative reduction
512 64 0.088095 0.085472 2.98%
1024 8 0.099396 0.093628 5.80%

LPIPS improved on 62/64 images at 512 (two ties) and 8/8 at 1024. Average L1 and PSNR also improved. Metrics are in validation_metrics.json.

These are modest reconstruction improvements on a small holdout that was also used for checkpoint selection. They do not establish broad generalization or prove that the GAN term itself adds meaningful texture; there was no matched GAN-disabled ablation. Visual differences can be subtle.

Credits and license

Original model by well9472, MIT. GAN fine-tuning by levzalt. The earlier partial-decoder approach was inspired by madebyollin's texture-fix VAE.

The current checkpoint's SHA-256 is recorded in SHA256SUMS.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for levzalt/Nanosaur2-GAN-VAE

Finetuned
(2)
this model