--- language: - en license: other license_name: stabilityai-community-license license_link: https://huggingface.co/AhmadRH/PACT/blob/main/sd35/LICENSE base_model: stabilityai/stable-diffusion-3.5-medium base_model_relation: adapter library_name: pytorch pipeline_tag: text-to-image tags: [pact, flow-matching, distillation, lora] --- # PACT for Stable Diffusion 3.5 Medium **Powered by Stability AI.** Inference adapter for **PACT: Preserving Accurate Continuous Trajectories via Flow-Map Distillation**, released by the PACT authors. This is the **raw step-190,000** paper checkpoint, with rank/alpha 384 attention LoRA and the learned destination-time/guidance conditioner. It is a modified derivative of Stable Diffusion 3.5 Medium, not an official Stability AI release. ## Base and contents Download the base separately after accepting its access terms: [`stabilityai/stable-diffusion-3.5-medium`](https://huggingface.co/stabilityai/stable-diffusion-3.5-medium), revision `b940f670f0eda2d07fbb75229e779da1ad11eb80`. `flowmap_lora.safetensors` and `flowmap_conditioner.safetensors` are both required. `flowmap_manifest.json` records architecture and tensor-file hashes; `training_config.yaml` preserves the portable final recipe; `paper_schedules.json` stores the exact schedules. All 390 trainable tensors passed bitwise zero/reload export verification, recorded in `export_validation.json`. `SHA256SUMS` covers the complete published folder. The main setting is **four student evaluations at 1024×1024, learned CFG 4.5, and no additional external CFG**. Use the PACT loader; generic LoRA loading is insufficient. ## Usage Install the accompanying PACT `SD35-FlowBank-Distillation/` source tree following its README (source publication is pending), and authenticate for the gated base with `hf auth login`. Training is unnecessary. From that source directory: ```bash export SD35_DATA=/absolute/path/to/pact-sd35-data hf download AhmadRH/PACT --include 'sd35/*' --local-dir "$SD35_DATA/pact-checkpoints" export SD35_ADAPTER="$SD35_DATA/pact-checkpoints/sd35" python scripts/infer.py \ --checkpoint "$SD35_ADAPTER" \ --prompt 'A wooden rowboat on a turquoise lake beneath snowy peaks.' \ --seed 42 --nfe 4 --output "$SD35_DATA/rowboat.png" ``` The source README documents CUDA/PyTorch and pinned Diffusers/Transformers dependencies. Use a separate environment for this image implementation and the LTX implementation. These adapters do not contain the base weights or optimizer/RNG/EMA state. ## Training data and method The final method uses raw prompts from [DiffusionDB](https://huggingface.co/datasets/poloclub/diffusiondb) (CC0-1.0) and [Pick-a-Pic v1](https://huggingface.co/datasets/pickapic-anonymous/pickapic_v1) (no license field in the inspected card). Prompts are filtered, clustered and selected without enhancement. A frozen teacher constructs 28-step trajectories; PACT trains destination/guidance conditioning and rank-384 attention LoRA on interval-average velocity plus endpoint MSE. See [Notice](https://huggingface.co/AhmadRH/PACT/blob/main/sd35/Notice) for pinned source attribution. The exact earlier 50k prompt manifest was not preserved in the release. The code reconstructs the selection method without claiming byte-identical historical data. Training data are not redistributed here. ## Evaluation and limitations The raw paper adapter passed release inference and visual checks. A separate 500-update fresh-training smoke test reduced mean loss from 0.124115 to 0.013757. These small checks establish execution and loading; they do not reproduce the full paper's image-quality, diversity or teacher-similarity benchmarks. The code provides the paper evaluation entrypoints with their original metric backbones. The adapter inherits base-model biases and limitations. Few-step outputs may differ from the teacher in fine detail, color and composition. Research and evaluation are the intended uses; users must comply with upstream restrictions and applicable rights in inputs/outputs. ## License The adapter is distributed under the included [Stability AI Community License](https://huggingface.co/AhmadRH/PACT/blob/main/sd35/LICENSE), dated July 5, 2024, with its incorporated [Acceptable Use Policy](https://stability.ai/use-policy). The license covers LoRA derivatives, requires its attribution and notices on redistribution, and imposes commercial registration/revenue conditions. Read the full terms; this release does not waive them or clear dataset rights. [Notice](https://huggingface.co/AhmadRH/PACT/blob/main/sd35/Notice) includes the PACT authors' permission for the adapter modifications whose rights they control, subject to that agreement. The separate original PACT code license is not assigned by this model card.