Instructions to use nvidia/Cosmos3-Edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Cosmos
How to use nvidia/Cosmos3-Edge with Cosmos:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add image-to-video with negative prompt example
#44
by liang1225 - opened
- .gitattributes +1 -0
- README.md +10 -2
- assets/edge_i2v_negprompt_output.mp4 +3 -0
.gitattributes
CHANGED
|
@@ -51,3 +51,4 @@ assets/edge_i2v_output.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
| 51 |
assets/edge_action_fd_umi_2chunk_output.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 52 |
assets/edge_action_id_av_0_output.png filter=lfs diff=lfs merge=lfs -text
|
| 53 |
assets/edge_action_id_av_1_output.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 51 |
assets/edge_action_fd_umi_2chunk_output.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 52 |
assets/edge_action_id_av_0_output.png filter=lfs diff=lfs merge=lfs -text
|
| 53 |
assets/edge_action_id_av_1_output.png filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
assets/edge_i2v_negprompt_output.mp4 filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -481,14 +481,22 @@ Cosmos3-Edge is a compact omni model that fits on a single GPU and is the recomm
|
|
| 481 |
|
| 482 |
#### Image to video
|
| 483 |
|
|
|
|
|
|
|
| 484 |
```shell
|
| 485 |
BASE="https://huggingface.co/nvidia/Cosmos3-Edge/resolve/main/assets"
|
| 486 |
python - "$BASE" <<'PY'
|
| 487 |
import json, sys, urllib.request
|
| 488 |
base = sys.argv[1]
|
| 489 |
prompt = urllib.request.urlopen(f"{base}/example_i2v_prompt.json").read().decode()
|
|
|
|
| 490 |
json.dump(
|
| 491 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 492 |
open("i2v_edge.json", "w"), indent=2,
|
| 493 |
)
|
| 494 |
PY
|
|
@@ -512,7 +520,7 @@ The generated video is written to `outputs/omni_edge/<sample_name>/vision.mp4`.
|
|
| 512 |
|
| 513 |
Example output:
|
| 514 |
|
| 515 |
-
<video controls width="832" height="480" src="https://huggingface.co/nvidia/Cosmos3-Edge/resolve/main/assets/
|
| 516 |
|
| 517 |
#### Action — forward dynamics
|
| 518 |
|
|
|
|
| 481 |
|
| 482 |
#### Image to video
|
| 483 |
|
| 484 |
+
Image-to-video generation steered by a structured **negative prompt** that keeps the model away from common failure modes (temporal flicker, morphing geometry, broken physics, unstable camera push-in). We pass the curated `negative_prompt.json` from `assets/` as the per-sample `negative_prompt` (JSON-encoded as a string, mirroring the model's default negative caption format).
|
| 485 |
+
|
| 486 |
```shell
|
| 487 |
BASE="https://huggingface.co/nvidia/Cosmos3-Edge/resolve/main/assets"
|
| 488 |
python - "$BASE" <<'PY'
|
| 489 |
import json, sys, urllib.request
|
| 490 |
base = sys.argv[1]
|
| 491 |
prompt = urllib.request.urlopen(f"{base}/example_i2v_prompt.json").read().decode()
|
| 492 |
+
negative = urllib.request.urlopen(f"{base}/negative_prompt.json").read().decode()
|
| 493 |
json.dump(
|
| 494 |
+
{
|
| 495 |
+
"model_mode": "image2video",
|
| 496 |
+
"prompt": prompt,
|
| 497 |
+
"vision_path": f"{base}/example_i2v_input.jpg",
|
| 498 |
+
"negative_prompt": json.dumps(json.loads(negative)),
|
| 499 |
+
},
|
| 500 |
open("i2v_edge.json", "w"), indent=2,
|
| 501 |
)
|
| 502 |
PY
|
|
|
|
| 520 |
|
| 521 |
Example output:
|
| 522 |
|
| 523 |
+
<video controls width="832" height="480" src="https://huggingface.co/nvidia/Cosmos3-Edge/resolve/main/assets/edge_i2v_negprompt_output.mp4"></video>
|
| 524 |
|
| 525 |
#### Action — forward dynamics
|
| 526 |
|
assets/edge_i2v_negprompt_output.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f2d41ae997adea1eef0f046b837404d6add2798e050974ea36696cee4b3efd00
|
| 3 |
+
size 23017533
|