MickJ commited on
Commit
d4a7e99
·
1 Parent(s): b5f2fbe

Simplify SGLang Cosmos3 serve examples

Browse files
Files changed (1) hide show
  1. README.md +11 -9
README.md CHANGED
@@ -935,13 +935,15 @@ cd sglang
935
  pip install -e "python[diffusion]"
936
  pip install "cosmos-guardrail==0.3.1"
937
 
 
 
 
 
 
 
938
  sglang serve \
939
- --model-type diffusion \
940
- --model-path nvidia/Cosmos3-Nano \
941
- --num-gpus 1 \
942
- --host 0.0.0.0 \
943
- --port 8000 \
944
- --output-path /tmp/cosmos3-sglang
945
  ```
946
 
947
  Supported SGLang endpoints:
@@ -955,7 +957,7 @@ Supported SGLang endpoints:
955
  Example text-to-video request:
956
 
957
  ```shell
958
- job_id=$(curl -sS -X POST http://localhost:8000/v1/videos \
959
  --form-string "prompt=A small warehouse robot moves a blue box across a clean floor." \
960
  --form-string "negative_prompt=blurry, distorted, low quality" \
961
  --form-string "size=1280x720" \
@@ -969,14 +971,14 @@ job_id=$(curl -sS -X POST http://localhost:8000/v1/videos \
969
  | python -c 'import json, sys; print(json.load(sys.stdin)["id"])')
970
 
971
  while true; do
972
- status=$(curl -sS "http://localhost:8000/v1/videos/${job_id}" \
973
  | python -c 'import json, sys; print(json.load(sys.stdin)["status"])')
974
  [ "$status" = "completed" ] && break
975
  [ "$status" = "failed" ] && exit 1
976
  sleep 1
977
  done
978
 
979
- curl -sS -L "http://localhost:8000/v1/videos/${job_id}/content" \
980
  -o cosmos3_t2v_output.mp4
981
  ```
982
 
 
935
  pip install -e "python[diffusion]"
936
  pip install "cosmos-guardrail==0.3.1"
937
 
938
+ sglang serve --model-path nvidia/Cosmos3-Nano
939
+ ```
940
+
941
+ For a video-specialized checkpoint, use `Cosmos3-Super-Image2Video` with multiple GPUs:
942
+
943
+ ```shell
944
  sglang serve \
945
+ --model-path nvidia/Cosmos3-Super-Image2Video \
946
+ --num-gpus 4
 
 
 
 
947
  ```
948
 
949
  Supported SGLang endpoints:
 
957
  Example text-to-video request:
958
 
959
  ```shell
960
+ job_id=$(curl -sS -X POST http://localhost:30000/v1/videos \
961
  --form-string "prompt=A small warehouse robot moves a blue box across a clean floor." \
962
  --form-string "negative_prompt=blurry, distorted, low quality" \
963
  --form-string "size=1280x720" \
 
971
  | python -c 'import json, sys; print(json.load(sys.stdin)["id"])')
972
 
973
  while true; do
974
+ status=$(curl -sS "http://localhost:30000/v1/videos/${job_id}" \
975
  | python -c 'import json, sys; print(json.load(sys.stdin)["status"])')
976
  [ "$status" = "completed" ] && break
977
  [ "$status" = "failed" ] && exit 1
978
  sleep 1
979
  done
980
 
981
+ curl -sS -L "http://localhost:30000/v1/videos/${job_id}/content" \
982
  -o cosmos3_t2v_output.mp4
983
  ```
984