xrenaa commited on
Commit
12373c4
Β·
verified Β·
1 Parent(s): 1c6eee3

Update model card: latent-space table + LDM HF links, SDXL/Qwen-Image VAE, flux2 2kto4k _2606 ckpt, updated demo cmd

Browse files
Files changed (1) hide show
  1. README.md +48 -33
README.md CHANGED
@@ -39,7 +39,7 @@ super-resolved image in one pass. This repository hosts the released decoder
39
  checkpoints, plus the encoder/decoder ("VAE") weights they depend on.
40
 
41
  All `PiD_*` checkpoints in this repo are **4-step distilled**. The non-`PiD_*`
42
- entries (`ae.safetensors`, `flux2_ae.safetensors`, `sd3_vae/`, `rae/`,
43
  `scale_rae/`) are **the corresponding encoder/decoder VAE weights** that PiD
44
  plugs into β€” they're not PiD checkpoints themselves.
45
 
@@ -56,41 +56,56 @@ Two variants are released for each diffusers-style backbone:
56
 
57
  - **`2k`** β€” trained at 2048px, used as a 4Γ— decoder (512 LDM β†’ 2048 px), or as
58
  an 8Γ— decoder for the Scale-RAE backbone (256 β†’ 2048).
59
- - **`2kto4k`** β€” trained with multi-resolution data bucketing 2048β†’3840 and an
60
  SD3-style dynamic shift; designed for 1024 LDM β†’ 4K (4096 px) decoding.
61
 
62
  Both checkpoint variants support multiple aspect ratios.
63
 
64
- | Path | Backbone (encoder side) | SR factor | Variant |
65
- |---------------------------------------------------------------|--------------------------------------------|-----------|-----------|
66
- | `checkpoints/PiD_res2k_sr4x_official_flux_distill_4step` | Flux1-dev (16-ch VAE) | 4Γ— | 2k |
67
- | `checkpoints/PiD_res2k_sr4x_official_flux2_distill_4step` | Flux2-dev (128-ch BN VAE) | 4Γ— | 2k |
68
- | `checkpoints/PiD_res2k_sr4x_official_sd3_distill_4step` | SD3 medium (16-ch VAE) | 4Γ— | 2k |
69
- | `checkpoints/PiD_res2k_sr4x_official_dinov2_distill_4step` | DINOv2-B + RAE ViT-XL (768-ch) | 4Γ— | 2k |
70
- | `checkpoints/PiD_res2k_sr8x_official_siglip_distill_4step` | SigLIP-2 So400M + Scale-RAE ViT-XL (1152) | 8Γ— | 2k |
71
- | `checkpoints/PiD_res2kto4k_sr4x_official_flux_distill_4step` | Flux1-dev (16-ch VAE) | 4Γ— | 2kto4k |
72
- | `checkpoints/PiD_res2kto4k_sr4x_official_flux2_distill_4step` | Flux2-dev (128-ch BN VAE) | 4Γ— | 2kto4k |
73
- | `checkpoints/PiD_res2kto4k_sr4x_official_sd3_distill_4step` | SD3 medium (16-ch VAE) | 4Γ— | 2kto4k |
74
-
75
- Z-Image shares Flux1's VAE, so its inference path reuses the `flux` checkpoints
76
- (both `2k` and `2kto4k`) β€” no separate `zimage` checkpoint is shipped.
77
 
78
  Each directory contains a single file, `model_ema_bf16.pth`, which is the EMA
79
  weights cast to bfloat16 β€” the format the inference scripts load by default.
80
 
81
- ## VAE / encoder weights
82
-
83
- These are the per-backbone encoder (and, where applicable, original decoder)
84
- weights that PiD pairs with. They're hosted here so a single download brings
85
- everything needed end-to-end.
86
-
87
- | Path | Description |
88
- |---------------------------------|--------------------------------------------------------------------------------------|
89
- | `checkpoints/ae.safetensors` | Flux1-dev / Z-Image 16-ch VAE (encoder + original Flux decoder). |
90
- | `checkpoints/flux2_ae.safetensors` | Flux2-dev 128-ch BN VAE. |
91
- | `checkpoints/sd3_vae/` | SD3 medium 16-ch VAE in diffusers format. |
92
- | `checkpoints/rae/` | DINOv2-B image encoder + RAE ViT-XL decoder + ImageNet-512 normalization statistics. |
93
- | `checkpoints/scale_rae/` | SigLIP-2 So400M encoder + Scale-RAE ViT-XL decoder + decoder config. |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  ## Usage
96
 
@@ -107,11 +122,11 @@ automatically:
107
  hf download nvidia/PiD --local-dir . --include "checkpoints/*"
108
 
109
  # Then run any of the demos, e.g.:
110
- PYTHONPATH=. python -m pid._src.inference.from_ldm_flux \
111
- --prompt "A photorealistic cat" \
112
- --ldm_inference_steps 28 --save_xt_steps 22 24 26 \
113
- --output_dir ./results/demo \
114
- --cfg_scale 1 --pid_inference_steps 4 --scale 4
115
  ```
116
 
117
  Pick the `2kto4k` variant via `--pid_ckpt_type 2kto4k` when decoding at 4K.
 
39
  checkpoints, plus the encoder/decoder ("VAE") weights they depend on.
40
 
41
  All `PiD_*` checkpoints in this repo are **4-step distilled**. The non-`PiD_*`
42
+ entries (`ae.safetensors`, `flux2_ae.safetensors`, `sdxl_vae.safetensors`, `QwenImage_VAE_2d.pth`, `sd3_vae/`, `rae/`,
43
  `scale_rae/`) are **the corresponding encoder/decoder VAE weights** that PiD
44
  plugs into β€” they're not PiD checkpoints themselves.
45
 
 
56
 
57
  - **`2k`** β€” trained at 2048px, used as a 4Γ— decoder (512 LDM β†’ 2048 px), or as
58
  an 8Γ— decoder for the Scale-RAE backbone (256 β†’ 2048).
59
+ - **`2kto4k`** β€” trained with multi-resolution data bucketing 2048β†’4096 and an
60
  SD3-style dynamic shift; designed for 1024 LDM β†’ 4K (4096 px) decoding.
61
 
62
  Both checkpoint variants support multiple aspect ratios.
63
 
64
+ | Path | Latent space | SR factor | Variant |
65
+ |-----------------------------------------------------------------|--------------|-----------|---------|
66
+ | `checkpoints/PiD_res2k_sr4x_official_flux_distill_4step` | Flux1-dev | 4Γ— | 2k |
67
+ | `checkpoints/PiD_res2k_sr4x_official_flux2_distill_4step` | Flux2-dev | 4Γ— | 2k |
68
+ | `checkpoints/PiD_res2k_sr4x_official_sd3_distill_4step` | SD3 medium | 4Γ— | 2k |
69
+ | `checkpoints/PiD_res2k_sr4x_official_dinov2_distill_4step` | DINOv2-B | 4Γ— | 2k |
70
+ | `checkpoints/PiD_res2k_sr8x_official_siglip_distill_4step` | SigLIP-2 | 8Γ— | 2k |
71
+ | `checkpoints/PiD_res2kto4k_sr4x_official_flux_distill_4step` | Flux1-dev | 4Γ— | 2kto4k |
72
+ | `checkpoints/PiD_res2kto4k_sr4x_official_flux2_distill_4step_2606` | Flux2-dev | 4Γ— | 2kto4k |
73
+ | `checkpoints/PiD_res2kto4k_sr4x_official_sd3_distill_4step` | SD3 medium | 4Γ— | 2kto4k |
74
+ | `checkpoints/PiD_res2kto4k_sr4x_official_sdxl_distill_4step` | SDXL | 4Γ— | 2kto4k |
75
+ | `checkpoints/PiD_res2kto4k_sr4x_official_qwenimage_distill_4step` | Qwen-Image | 4Γ— | 2kto4k |
 
76
 
77
  Each directory contains a single file, `model_ema_bf16.pth`, which is the EMA
78
  weights cast to bfloat16 β€” the format the inference scripts load by default.
79
 
80
+ > **⚠️ Flux2-dev `2kto4k` β€” use the new `_2606` checkpoint.** The previous
81
+ > `PiD_res2kto4k_sr4x_official_flux2_distill_4step` (without the `_2606` suffix)
82
+ > suffered from a color-drifting issue. The new
83
+ > `PiD_res2kto4k_sr4x_official_flux2_distill_4step_2606` fixes it β€” please use it
84
+ > and do **not** use the old one. See the
85
+ > [comparison](https://github.com/nv-tlabs/pid/blob/main/docs/FLUX2_2kto4k_new_ckpt_compare.md)
86
+ > for details.
87
+
88
+ ### Latent space β†’ compatible LDMs
89
+
90
+ A PiD decoder is tied to a *latent space*, not to a single generative model. Any
91
+ LDM that produces latents in that space can reuse the same checkpoint. The
92
+ `--backbone` aliases below pick the right LDM pipeline; they all decode through
93
+ the latent space's checkpoint above.
94
+
95
+ | Latent space | VAE / vision encoder weights | compatible `--backbone` | Corresponding LDM Links |
96
+ |--------------|------------------------------------|-------------------------------------------|-----------------|
97
+ | Flux1-dev | `checkpoints/ae.safetensors` | `flux`, `zimage`, `zimage-turbo` | [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev), [Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image), [Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo) |
98
+ | Flux2-dev | `checkpoints/flux2_ae.safetensors` | `flux2`, `flux2-klein-4b`, `flux2-klein-9b` | [FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev), [FLUX.2-klein-4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B), [FLUX.2-klein-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-9B) |
99
+ | SD3 medium | `checkpoints/sd3_vae/` | `sd3` | [SD3-medium](https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers) |
100
+ | SDXL | `checkpoints/sdxl_vae.safetensors` | `sdxl` | [SDXL-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) |
101
+ | Qwen-Image | `checkpoints/QwenImage_VAE_2d.pth` | `qwenimage`, `qwenimage-2512` | [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image), [Qwen-Image-2512](https://huggingface.co/Qwen/Qwen-Image-2512) |
102
+ | DINOv2-B | `checkpoints/rae/` | `dinov2` | [RAE](https://github.com/bytetriper/RAE) (class-conditional; DINOv2-B) |
103
+ | SigLIP-2 | `checkpoints/scale_rae/` | `siglip` | [Scale-RAE](https://github.com/ZitengWangNYU/Scale-RAE) (text-conditional; nyu-visionx/Scale-RAE-Qwen1.5B_DiT2.4B) |
104
+
105
+ For example, Z-Image and Z-Image-Turbo share Flux1-dev's VAE, so they reuse the
106
+ `flux` checkpoints (both `2k` and `2kto4k`) β€” no separate `zimage` checkpoint is
107
+ shipped. Likewise `qwenimage-2512` reuses the `qwenimage` decoder (same VAE,
108
+ different transformer).
109
 
110
  ## Usage
111
 
 
122
  hf download nvidia/PiD --local-dir . --include "checkpoints/*"
123
 
124
  # Then run any of the demos, e.g.:
125
+ PYTHONPATH=. python -m pid._src.inference.from_ldm --backbone flux \
126
+ --prompt "A photorealistic half-body portrait of a brown tabby cat with bold stripes sitting attentively on a rustic wooden kitchen table, soft morning light streaming sideways through a large window, fine fur detail and stripe patterns sharply visible, intense amber-green eyes in razor-sharp focus, warm farmhouse kitchen softly out of focus, cinematic shallow depth of field, ultra-detailed fur texture, photorealistic" \
127
+ --ldm_inference_steps 28 --save_xt_steps 24 \
128
+ --output_dir ./results/official_demo/flux \
129
+ --pid_inference_steps 4
130
  ```
131
 
132
  Pick the `2kto4k` variant via `--pid_ckpt_type 2kto4k` when decoding at 4K.