[Refactor]: Remove sensenova examples (#5201)

Signed-off-by: princepride <wangzhipeng628@gmail.com>
This commit is contained in:
汪志鹏 authored and GitHub committed 2026-07-22 15:36:00 +00:00
1 parent 8219c01b57
commit f44649ffd0
10 files changed
+182 -604

No files matched your search

+40 -36
View File
@@ -22,8 +22,10 @@ text-to-text chat.
## References
- Offline example:
[`examples/offline_inference/sensenova_u1/end2end.py`](../../examples/offline_inference/sensenova_u1/end2end.py)
- Offline text-to-image:
[`examples/offline_inference/text_to_image/text_to_image.py`](../../examples/offline_inference/text_to_image/text_to_image.py)
- Offline image-to-image:
[`examples/offline_inference/image_to_image/image_edit.py`](../../examples/offline_inference/image_to_image/image_edit.py)
- Online serving:
[`examples/online_serving/sensenova_u1/`](../../examples/online_serving/sensenova_u1/)
- E2E tests:
@@ -48,13 +50,14 @@ text-to-text chat.
#### Command
```bash
python examples/offline_inference/sensenova_u1/end2end.py \
python examples/offline_inference/text_to_image/text_to_image.py \
--model SenseNova/SenseNova-U1-8B-MoT \
--prompt "Close portrait of an elderly woman by a farmhouse window, textured skin, gentle smile, warm natural light, emotional documentary look. The portrait should feel polished and natural, with sharp eyes, realistic skin texture, accurate facial anatomy, and premium lighting that keeps the face as the main focus." \
--width 1536 --height 2720 \
--seed 42 --num-steps 50 \
--cfg-scale 4.0 --timestep-shift 3.0 --cfg-norm none \
--think --print-think \
--output outputs
--seed 42 --num-inference-steps 50 \
--cfg-scale 4.0 \
--extra-body '{"think": true, "cfg_norm": "none", "timestep_shift": 3.0, "t_eps": 0.02}' \
--output outputs/sensenova_u1_output.png
```
#### Verification
@@ -74,8 +77,7 @@ pytest -s -v tests/e2e/offline_inference/test_sensenova_u1_text2img.py \
#### Text-to-Image via the shared example
SenseNova-U1 is also registered with the shared text-to-image example, so you
can run it through `text_to_image.py` instead of `end2end.py`. Forward the
SenseNova-U1 is registered with the shared text-to-image example. Forward
SenseNova-specific generation parameters as a JSON object through `--extra-body`:
```bash
@@ -94,48 +96,49 @@ The `--extra-body` keys are filtered against the model's declared
[`vllm_omni/model_extras/sensenova_u1.py`](../../vllm_omni/model_extras/sensenova_u1.py)):
`think`, `cfg_scale`, `cfg_norm`, `timestep_shift`, `t_eps`, `img_cfg_scale`,
and `max_tokens`. No deploy YAML is needed — the engine auto-generates a
single-stage diffusion config. For richer task modalities (img2text, text2text)
and CPU offload, use the dedicated `end2end.py` script described above.
single-stage diffusion config.
#### Image-to-Image Editing (img2img)
```bash
python examples/offline_inference/sensenova_u1/end2end.py \
python examples/offline_inference/image_to_image/image_edit.py \
--model SenseNova/SenseNova-U1-8B-MoT \
--prompt "Turn this into an oil painting" \
--image input.png \
--width 2048 --height 2048 \
--seed 42 --num-steps 50 \
--cfg-scale 4.0 --img-cfg-scale 1.0 --cfg-norm none \
--think --print-think \
--output outputs
--resolution 2048 \
--seed 42 --num-inference-steps 50 \
--cfg-scale 4.0 \
--extra-args '{"think": true, "img_cfg_scale": 1.0, "cfg_norm": "none", "timestep_shift": 3.0}' \
--output outputs/sensenova_u1_edit.png
```
- img2img uses dual CFG: `--cfg-scale` controls text guidance, `--img-cfg-scale`
controls image guidance (1.0 = image CFG disabled).
- Pass multiple `--image` paths for multi-reference editing.
- img2img uses dual CFG: `--cfg-scale` controls text guidance, while
`img_cfg_scale` in `--extra-args` controls image guidance (1.0 = image CFG
disabled).
- Pass multiple `--image` paths for multi-reference editing when the underlying
pipeline supports them.
#### Image Understanding (img2text)
```bash
python examples/offline_inference/sensenova_u1/end2end.py \
--modality img2text \
vllm serve SenseNova/SenseNova-U1-8B-MoT --omni --port 8091
python examples/online_serving/sensenova_u1/openai_chat_client.py \
--prompt "Describe this image in detail" \
--image photo.jpg \
--max-tokens 512
--modality img2text \
--image-url photo.jpg
```
#### Text-to-Text Chat (text2text)
```bash
python examples/offline_inference/sensenova_u1/end2end.py \
--modality text2text \
vllm serve SenseNova/SenseNova-U1-8B-MoT --omni --port 8091
python examples/online_serving/sensenova_u1/openai_chat_client.py \
--prompt "Explain the theory of relativity in simple terms" \
--max-tokens 256
--modality text2text
```
- For img2text and text2text, image generation parameters (height, width,
num-steps, cfg-scale) are ignored.
- Use `--do-sample --temperature 0.7` for more diverse text responses.
- For img2text and text2text, use the online chat-compatible example. The
offline generic image examples intentionally focus on image-producing tasks.
### 2x H200 (144GB) — TP=2
@@ -149,19 +152,20 @@ python examples/offline_inference/sensenova_u1/end2end.py \
#### Command
```bash
python examples/offline_inference/sensenova_u1/end2end.py \
python examples/offline_inference/text_to_image/text_to_image.py \
--model SenseNova/SenseNova-U1-8B-MoT \
--prompt "Close portrait of an elderly woman by a farmhouse window, textured skin, gentle smile, warm natural light, emotional documentary look. The portrait should feel polished and natural, with sharp eyes, realistic skin texture, accurate facial anatomy, and premium lighting that keeps the face as the main focus." \
--width 1536 --height 2720 \
--seed 42 --num-steps 50 \
--cfg-scale 4.0 --timestep-shift 3.0 --cfg-norm none \
--think --print-think \
--seed 42 --num-inference-steps 50 \
--cfg-scale 4.0 \
--extra-body '{"think": true, "cfg_norm": "none", "timestep_shift": 3.0, "t_eps": 0.02}' \
--tensor-parallel-size 2 \
--output outputs
--output outputs/sensenova_u1_output.png
```
#### Verification
Verify the output image is generated at `outputs/sensenova_u1_output_0.png`
Verify the output image is generated at `outputs/sensenova_u1_output.png`
with the expected 1536×2720 resolution.
#### Notes