--- base_model: Qwen/Qwen3.5-9B library_name: peft pipeline_tag: image-text-to-text license: apache-2.0 tags: - lora - peft - video-editing - tool-use --- # PREditor (LoRA adapter) PREditor is the editing model of [PRProducer](https://github.com/mttry/PRProducer), an automated video creation system that composes an editable Adobe Premiere Pro project by following the workflow of a professional editor. Given the current composition, one asset and the guidance written for it, PREditor predicts the next tool call. This repository holds the **LoRA adapter only** (about 45 MB). Apply it to `Qwen/Qwen3.5-9B` to obtain the model; see *Usage* below. - Paper: [arXiv:2612.05608](https://arxiv.org/abs/2612.05608) - Code: [github.com/mttry/PRProducer](https://github.com/mttry/PRProducer) - Project page: https://mttry.github.io/PRProducer/ - Training checkpoint: SFT `checkpoint-6830`, trained on CreativePR ## What is in this repository | File | Purpose | | --- | --- | | `adapter_model.safetensors` | LoRA weights (r=8, alpha=32) plus the trained-token deltas | | `adapter_config.json` | PEFT configuration | | `tokenizer.json`, `tokenizer_config.json` | **Required** — see below | | `preprocessor_config.json`, `processor_config.json`, `video_preprocessor_config.json` | Image/video preprocessing | | `chat_template.jinja`, `generation_config.json` | Chat template and decoding defaults | ### The tokenizer is required, not optional Training added **243 tokens** (ids `248077`–`248319`, written `<|L00|>`, `<|L01|>`, …) that encode geometry and tool-call structure compactly. The base `Qwen/Qwen3.5-9B` tokenizer does not contain them: it stops at id `248069`. The adapter ships the embedding and `lm_head` rows for those tokens, as `token_adapter.trainable_tokens_delta` tensors, so the weights are complete. But the base tokenizer cannot produce or read the token ids they correspond to. Load the tokenizer from **this** repository, not from the base model, or the model will neither accept nor emit valid tool calls. ## Usage ```python from peft import PeftModel from transformers import AutoModelForCausalLM, AutoProcessor BASE = "Qwen/Qwen3.5-9B" ADAPTER = "" model = AutoModelForCausalLM.from_pretrained(BASE, dtype="bfloat16", device_map="auto") model.resize_token_embeddings(248320) # room for the trained tokens model = PeftModel.from_pretrained(model, ADAPTER) processor = AutoProcessor.from_pretrained(ADAPTER) # not from BASE ``` To serve it with vLLM, merge first and save the result alongside this repository's tokenizer and processor files: ```python merged = model.merge_and_unload() merged.save_pretrained("preditor-merged") processor.save_pretrained("preditor-merged") ``` Then point `PRPRODUCER_EDITOR_BASE_URL` at the vLLM server; see `scripts/serve_editor.sh` in the code repository. ## Inputs and outputs PREditor is called once per asset. Its input is the rendered state of the composition so far as sampled frames, the asset and its caption, and five fields of guidance: function, temporal placement, spatial layout, clip relations and effect behavior. Its output is a JSON object of tool calls that the executor applies to the project state. The surrounding components — asset collection, sequence planning and the tool executor — are not part of this adapter and live in the code repository. ## Training LoRA (r=8, alpha=32, dropout 0.05) on the language-model projections (`q_proj`, `k_proj`, `v_proj`, `o_proj`, `up_proj`, `gate_proj`, `down_proj` and the linear-attention projections), plus the 243 trained tokens. The base model is frozen otherwise. Data is CreativePR, a dataset of 10,504 Premiere Pro projects with annotated operation traces, which is not released: it is built from licensed projects and media. ## Citation ```bibtex @article{mou2026prproducer, title = {PRProducer: Automated Video Creation with a Human-Like Creative Workflow}, author = {Mou, Tingshu and Li, Jiayu and Shuai, Xincheng and Cheng, Wei and Fang, Yixiao and Zeng, Xianfang and Zhang, Yuchen and Yang, Yiying and Zhang, Tiehua and Yu, Gang and Ma, Xingjun}, journal = {arXiv preprint arXiv:2612.05608}, year = {2026} } ```