Show-o2 1.5B visual understanding and flow components, with Wan2.1 VAE
All 571 non-Qwen tensors from the official Show-o2 1.5B checkpoint, preserving names, dtypes and values. The package includes the trained dual latent embedders, 26-layer SigLIP-derived semantic transformer, learned positions, fusion projections, time embeddings, hidden projections, all ten modulated flow blocks and the final velocity head. The 339 showo.* language-backbone tensors are excluded.
The official pipeline also requires an external Wan2.1 VAE. Its original 507,609,880-byte file is included under vae/source.pth, with its official SHA-256, license and the native Show-o2 Wan implementation. This is the original Wan dependency, not a newly trained Show-o2-specific VAE. The main visual safetensors file is 2,575,011,016 bytes.
Install requirements.txt in a separate environment. The bundled original code is tested with Transformers 4.57.6; Transformers 5 is incompatible with its legacy internals.
from huggingface_hub import snapshot_download
import sys, torch
folder = snapshot_download('gatilin/showo2_1_5b_visual_flow_components')
sys.path.insert(0, folder)
from component import load_model, load_vae
visual = load_model(folder)
vae = load_vae(folder)
rgb = torch.zeros(1, 3, 1, 64, 64) # B,C,T,H,W; RGB in [-1,1]
with torch.inference_mode():
latent, log_variance, features = vae.model.encode(rgb, vae.scale)
llm_image_inputs = visual.encode_latents(latent[:, :, 0], torch.tensor([0.5]))
reconstructed_rgb = vae.model.decode(latent, vae.scale)
encode_latents accepts a single image per batch item, in the original normalized 16-channel Wan latent space. It returns a time token followed by fused visual tokens in the 1536-dimensional Qwen input space. Position interpolation follows the native method with the nonpersistent position-ID length resolved for the actual image shape.
Full understanding or language-conditioned generation still requires the matching trained Qwen backbone, tokenizer, prompt packing, attention masks and sampler. Feed the real backbone's final hidden states into predict_velocity(states, t, modality_positions, attention_mask) to obtain the original 64-dimensional patch vectors. Modality ranges include the time token. Select the image range, remove its time token, then call velocity_image(patches, latent_height, latent_width) to preserve the official output ordering. For integration with text or interleaved images, use the original pipeline's full sequence attention mask. The visual adapter's convenience methods cover images; the separate native Wan codec supports images and videos.
validation.json includes per-tensor byte hashes, strict loading, complete block counts, square/rectangular fusion and finite velocity checks. It also compares the adapter against the unchanged original forward and unpatchify source methods, substituting an echo backbone solely at the excluded LLM boundary. This establishes visual-path parity, not actual language-conditioned generation. VAE validation covers one-frame 64px and five-frame 32px encoding/decoding, official LFS SHA-256, strict original-state equality and RGB-to-visual boundary compatibility. No image-quality, VQA, full-resolution sampler or video-flow benchmark is claimed. Re-run with python validate.py.
Native code is pinned to showlab/Show-o revision 45a5a2d. native/modeling_showo2_qwen2_5.py and native/misc.py are reference sources used by the parity harness, not standalone full-model entry points. The component wrapper instantiates the native classes without downloading another Qwen or SigLIP checkpoint. Source configurations, extraction metadata, tensor mapping, hashes, code provenance and validation reports are included. Apache-2.0 terms and original notices are retained; see LICENSE, NOTICE and vae/LICENSE.
Model tree for gatilin/showo2_1_5b_visual_flow_components
Base model
Wan-AI/Wan2.1-T2V-14B