Update README.md
Browse files
README.md
CHANGED
|
@@ -248,7 +248,9 @@ Please download all the necessary model checkpoints of [Lance-3B (Huggingface Li
|
|
| 248 |
|
| 249 |
### Inference
|
| 250 |
|
| 251 |
-
|
|
|
|
|
|
|
| 252 |
|
| 253 |
```bash
|
| 254 |
bash inference_lance.sh
|
|
@@ -258,6 +260,76 @@ bash inference_lance.sh
|
|
| 258 |
- **Supported tasks:** `t2i`, `t2v`, `image_edit`, `video_edit`, `x2t_image`, and `x2t_video`. You can modify `TASK_DEFAULT_CONFIGS` in `inference_lance.py` to customize the default data samples for each task.
|
| 259 |
- **Note:** For all tasks, we recommend following the `prompt` format used in the provided examples when writing input prompts, as this typically leads to better generation quality.
|
| 260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
#### Available Tasks
|
| 262 |
|
| 263 |
| Task Name | Description | Example JSON |
|
|
|
|
| 248 |
|
| 249 |
### Inference
|
| 250 |
|
| 251 |
+
We provide a unified command-line interface for all generation / editing / understanding tasks:
|
| 252 |
+
|
| 253 |
+
#### Option 1: Configure and Run the Unified Script
|
| 254 |
|
| 255 |
```bash
|
| 256 |
bash inference_lance.sh
|
|
|
|
| 260 |
- **Supported tasks:** `t2i`, `t2v`, `image_edit`, `video_edit`, `x2t_image`, and `x2t_video`. You can modify `TASK_DEFAULT_CONFIGS` in `inference_lance.py` to customize the default data samples for each task.
|
| 261 |
- **Note:** For all tasks, we recommend following the `prompt` format used in the provided examples when writing input prompts, as this typically leads to better generation quality.
|
| 262 |
|
| 263 |
+
#### Option 2: Configure and Run the Unified Script
|
| 264 |
+
|
| 265 |
+
We provide task-specific one-click commands for different generation, editing, and understanding tasks.
|
| 266 |
+
|
| 267 |
+
##### Text-to-Video Generation
|
| 268 |
+
|
| 269 |
+
```bash
|
| 270 |
+
bash inference_lance.sh \
|
| 271 |
+
--TASK_NAME t2v \
|
| 272 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 273 |
+
--RESOLUTION video_480p \
|
| 274 |
+
--NUM_FRAMES 121 \
|
| 275 |
+
--VIDEO_HEIGHT 480 \
|
| 276 |
+
--VIDEO_WIDTH 848 \
|
| 277 |
+
--SAVE_PATH_GEN results/t2v_121f
|
| 278 |
+
```
|
| 279 |
+
|
| 280 |
+
##### Text-to-Image Generation
|
| 281 |
+
|
| 282 |
+
```bash
|
| 283 |
+
bash inference_lance.sh \
|
| 284 |
+
--TASK_NAME t2i \
|
| 285 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 286 |
+
--RESOLUTION image_768res \
|
| 287 |
+
--VIDEO_HEIGHT 768 \
|
| 288 |
+
--VIDEO_WIDTH 768 \
|
| 289 |
+
--SAVE_PATH_GEN results/t2i
|
| 290 |
+
```
|
| 291 |
+
|
| 292 |
+
##### Video Editing
|
| 293 |
+
|
| 294 |
+
```bash
|
| 295 |
+
bash inference_lance.sh \
|
| 296 |
+
--TASK_NAME video_edit \
|
| 297 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 298 |
+
--RESOLUTION video_480p \
|
| 299 |
+
--SAVE_PATH_GEN results/video_edit
|
| 300 |
+
```
|
| 301 |
+
|
| 302 |
+
##### Image Editing
|
| 303 |
+
|
| 304 |
+
```bash
|
| 305 |
+
bash inference_lance.sh \
|
| 306 |
+
--TASK_NAME image_edit \
|
| 307 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 308 |
+
--RESOLUTION image_768res \
|
| 309 |
+
--SAVE_PATH_GEN results/image_edit
|
| 310 |
+
```
|
| 311 |
+
|
| 312 |
+
##### Video Understanding
|
| 313 |
+
|
| 314 |
+
```bash
|
| 315 |
+
bash inference_lance.sh \
|
| 316 |
+
--TASK_NAME x2t_video \
|
| 317 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 318 |
+
--RESOLUTION video_480p \
|
| 319 |
+
--NUM_FRAMES 50 \
|
| 320 |
+
--SAVE_PATH_GEN results/x2t_video
|
| 321 |
+
```
|
| 322 |
+
|
| 323 |
+
##### Image Understanding
|
| 324 |
+
|
| 325 |
+
```bash
|
| 326 |
+
bash inference_lance.sh \
|
| 327 |
+
--TASK_NAME x2t_image \
|
| 328 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 329 |
+
--RESOLUTION image_768res \
|
| 330 |
+
--SAVE_PATH_GEN results/x2t_image
|
| 331 |
+
```
|
| 332 |
+
|
| 333 |
#### Available Tasks
|
| 334 |
|
| 335 |
| Task Name | Description | Example JSON |
|