# Reproducibility Notes This repository now contains runnable entrypoints for the main T-Stitch experiment families, but full paper reproduction still requires external pretrained checkpoints, datasets, reference statistics, and some third-party baseline projects. ## DiT ImageNet Figure 5 pairwise sweeps can be generated with `dit/sample_ddp_t_stitch.py` by selecting the small and large DiT models: ```bash cd dit torchrun --nnodes=1 --nproc_per_node=8 sample_ddp_t_stitch.py \ --small-model DiT-S/2 \ --large-model DiT-XL/2 \ --solver ddim \ --num-sampling-steps 100 \ --num-fid-samples 5000 torchrun --nnodes=1 --nproc_per_node=8 sample_ddp_t_stitch.py \ --small-model DiT-B/2 \ --large-model DiT-XL/2 \ --solver ddim \ --num-sampling-steps 100 \ --num-fid-samples 5000 torchrun --nnodes=1 --nproc_per_node=8 sample_ddp_t_stitch.py \ --small-model DiT-S/2 \ --large-model DiT-B/2 \ --solver ddim \ --num-sampling-steps 100 \ --num-fid-samples 5000 ``` Figure 6 three-model sweeps are enabled by `--three_combo`. By default it enumerates the 0.1 allocation grid. Use `--three-fractions S B XL` to run a single allocation. ```bash torchrun --nnodes=1 --nproc_per_node=8 sample_ddp_t_stitch.py \ --three_combo \ --solver ddim \ --num-sampling-steps 100 \ --num-fid-samples 5000 ``` Figure 8 sampler ablations can use `--solver ddpm`, `--solver ddim`, or `--solver dpm-solver++`. The local DPM-Solver++ implementation supports `--dpm-solver-order 1` and `--dpm-solver-order 2`. Evaluate generated `.npz` files with: ```bash python evaluator.py /path/to/adm/ref_batch.npz /path/to/samples.npz ``` ## Stable Diffusion and MS-COCO Generate Table 2-style SD v1.4 / BK-SDM Tiny samples from COCO captions: ```bash python sd/generate_tstitch_prompts.py \ --pipeline sd \ --prompts /path/to/captions_val2014.json \ --output-dir outputs/sd_coco \ --height 256 \ --width 256 \ --steps 50 \ --guidance-scale 7.5 \ --limit 5000 ``` Pack each ratio directory for FID/IS: ```bash python sd/images_to_npz.py \ --image-dir outputs/sd_coco/ratio-0.3 \ --output outputs/sd_coco/ratio-0.3.npz ``` Compute raw CLIP cosine score: ```bash python sd/clip_score.py \ --metadata outputs/sd_coco/ratio-0.3/metadata.jsonl \ --output outputs/sd_coco/ratio-0.3-clip.json ``` FID/IS still require a matching MS-COCO reference `.npz`, evaluated with `dit/evaluator.py` or `ldm/evaluator.py`. ## SDXL, ControlNet, LCM, DeepCache, ToMe SDXL and LCM prompt sweeps use the same prompt generator: ```bash python sd/generate_tstitch_prompts.py --pipeline sdxl --prompts prompts.txt --output-dir outputs/sdxl python sd/generate_tstitch_prompts.py --pipeline sdxl-lcm --prompts prompts.txt --output-dir outputs/sdxl_lcm --steps 4 --guidance-scale 0 ``` ControlNet prompt sweeps: ```bash python sd/generate_tstitch_controlnet.py --control canny --prompts prompts.txt --output-dir outputs/controlnet_canny python sd/generate_tstitch_controlnet.py --control depth --prompts prompts.txt --output-dir outputs/controlnet_depth ``` Optional acceleration baselines are wired into `sd/generate_tstitch_prompts.py`: ```bash python sd/generate_tstitch_prompts.py --pipeline sd --prompts prompts.txt --output-dir outputs/sd_tome --tome-ratio 0.5 python sd/generate_tstitch_prompts.py --pipeline sd --prompts prompts.txt --output-dir outputs/sd_deepcache --deepcache-interval 3 ``` These require external packages: ```bash pip install tomesd pip install DeepCache ``` ## External Baselines Not Vendored The paper's SN-Netv2 model-stitching baseline and U-ViT experiments require third-party model definitions, training code, and checkpoints that are not included in this repository. This repository can now generate T-Stitch sample batches and metrics for comparison, but it still cannot train or evaluate SN-Netv2/U-ViT baselines without those external projects.