lightx2v commited on
Commit
8187d2f
·
verified ·
1 Parent(s): 827c915

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +100 -0
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - relayvsr
4
+ - lightx2v
5
+ - video-super-resolution
6
+ - super-resolution
7
+ - video-restoration
8
+ - video-enhancement
9
+ - 2x-upscaling
10
+ - safetensors
11
+ ---
12
+
13
+ # RelayVSR X2
14
+
15
+ We trained this RelayVSR model for **native, fixed 2× video super-resolution**.
16
+ It doubles the input video's width and height; for example, a 768 × 1344 video
17
+ becomes 1536 × 2688.
18
+
19
+ The [original RelayVSR model](https://huggingface.co/kopper/RelayVSR) uses a fixed
20
+ 4× super-resolution scale. This repository provides our separately trained 2×
21
+ variant, with inference supported by [LightX2V](https://github.com/ModelTC/LightX2V).
22
+
23
+ For inference instructions, see the
24
+ [LightX2V RelayVSR documentation](https://github.com/ModelTC/LightX2V/tree/main/scripts/relayvsr).
25
+
26
+ | Model | Native scale | Output dimensions |
27
+ | --- | --- | --- |
28
+ | [Original RelayVSR](https://huggingface.co/kopper/RelayVSR) | 4× | 4W × 4H |
29
+ | [RelayVSR X2](https://huggingface.co/lightx2v/RelayVSR_X2) | 2× | 2W × 2H |
30
+
31
+ ## Model Files
32
+
33
+ Download both checkpoints into the same model directory:
34
+
35
+ | File | Description |
36
+ | --- | --- |
37
+ | `wan_x2.safetensors` | Wan checkpoint for the 2× model |
38
+ | `flash_x2.safetensors` | Flash checkpoint for the 2× model |
39
+
40
+ ## Usage with LightX2V
41
+
42
+ You can use the LightX2V Docker image:
43
+
44
+ ```bash
45
+ docker pull lightx2v/lightx2v:26062001-cu130
46
+ ```
47
+
48
+ Run the following steps inside the container. First, clone the latest LightX2V source:
49
+
50
+ ```bash
51
+ git clone https://github.com/ModelTC/LightX2V.git
52
+ cd LightX2V
53
+ ```
54
+
55
+ Download the 2× weights:
56
+
57
+ ```bash
58
+ hf download lightx2v/RelayVSR_X2 \
59
+ wan_x2.safetensors flash_x2.safetensors \
60
+ --local-dir ./models/RelayVSR_X2
61
+ ```
62
+
63
+ Edit
64
+ [`scripts/relayvsr/run_relayvsr_x2_sr.sh`](https://github.com/ModelTC/LightX2V/blob/main/scripts/relayvsr/run_relayvsr_x2_sr.sh)
65
+ and set the absolute paths and GPU to use:
66
+
67
+ ```bash
68
+ lightx2v_path="/absolute/path/to/LightX2V"
69
+ model_path="/absolute/path/to/LightX2V/models/RelayVSR_X2"
70
+ video_path="/absolute/path/to/input.mp4"
71
+ export CUDA_VISIBLE_DEVICES=0
72
+ ```
73
+
74
+ Keep the script's X2 settings: `--model_cls relayvsr_x2`,
75
+ `--config_json "${lightx2v_path}/configs/relayvsr/relayvsr_x2.json"`, and
76
+ `--sr_ratio 2`. Use both X2 checkpoints together.
77
+
78
+ Run from the LightX2V repository root:
79
+
80
+ ```bash
81
+ bash scripts/relayvsr/run_relayvsr_x2_sr.sh
82
+ ```
83
+
84
+ The default output is `save_results/relayvsr_x2.mp4` inside the LightX2V repository.
85
+ Change `--save_result_path` in the script to choose another output location.
86
+
87
+ For block offloading or multi-GPU execution, see the
88
+ [LightX2V RelayVSR usage guide](https://github.com/ModelTC/LightX2V/tree/main/scripts/relayvsr).
89
+ Use the corresponding `relayvsr_x2_block_offload.json` or `relayvsr_x2_sp.json`
90
+ configuration. The default configuration enables compilation and warmup.
91
+
92
+ ## Upstream Sources
93
+
94
+ This model builds on the original RelayVSR project. Credit goes to the RelayVSR
95
+ authors for their method and implementation.
96
+
97
+ - Original Hugging Face model: [kopper/RelayVSR](https://huggingface.co/kopper/RelayVSR)
98
+ - Original GitHub repository: [kopperx/RelayVSR](https://github.com/kopperx/RelayVSR)
99
+ - LightX2V inference scripts: [ModelTC/LightX2V — RelayVSR](https://github.com/ModelTC/LightX2V/tree/main/scripts/relayvsr)
100
+