Image-Text-to-Text
Transformers
English
Chinese
eviscene
multimodal
image-factuality
agent
sft
distillation
Instructions to use ZiAnwang/EviScene with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZiAnwang/EviScene with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ZiAnwang/EviScene")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ZiAnwang/EviScene", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZiAnwang/EviScene with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZiAnwang/EviScene" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZiAnwang/EviScene", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ZiAnwang/EviScene
- SGLang
How to use ZiAnwang/EviScene with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ZiAnwang/EviScene" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZiAnwang/EviScene", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ZiAnwang/EviScene" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZiAnwang/EviScene", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ZiAnwang/EviScene with Docker Model Runner:
docker model run hf.co/ZiAnwang/EviScene
Download training/eviscene_training/psd_modality.py from ZiAnwang/EviScene: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/ZiAnwang/EviScene/resolve/main/training/eviscene_training/psd_modality.py
- Command line
-
hf download hf://ZiAnwang/EviScene/training/eviscene_training/psd_modality.py
-
curl -L -o psd_modality.py https://huggingface.co/ZiAnwang/EviScene/resolve/main/training/eviscene_training/psd_modality.py
1.66 kB
| """Require immutable media for visual Qwen3.5 PSD prompts.""" | |
| from typing import Any, Mapping, Sequence | |
| QWEN35_VISUAL_TOKEN_IDS = frozenset({248053, 248054, 248056, 248057}) | |
| def require_text_only_psd( | |
| row: Mapping[str, Any], *token_sequences: Sequence[int] | |
| ) -> None: | |
| media = row.get("psd_media") | |
| if media: | |
| from .psd_media import validate_media | |
| if any(248057 in sequence for sequence in token_sequences): | |
| raise ValueError("PSD video inputs are not supported by the image adapter") | |
| found_visual = False | |
| for sequence in token_sequences: | |
| # Completions have no images; validate prompt sequences only. | |
| if any(token in QWEN35_VISUAL_TOKEN_IDS for token in sequence): | |
| validate_media(media, sequence) | |
| found_visual = True | |
| if not found_visual: | |
| raise ValueError("PSD media supplied without visual prompt tokens") | |
| return | |
| visual_fields = ( | |
| "images", "videos", "multi_modal_data", "pixel_values", | |
| "pixel_values_videos", "image_grid_thw", "video_grid_thw", | |
| "multimodal_inputs", | |
| ) | |
| # Avoid truth-testing tensors; an explicitly present payload is unsupported. | |
| has_media = any(row.get(field) is not None for field in visual_fields) | |
| has_visual_ids = any( | |
| token in QWEN35_VISUAL_TOKEN_IDS | |
| for sequence in token_sequences for token in sequence | |
| ) | |
| if has_media or has_visual_ids: | |
| raise ValueError( | |
| "psd_multimodal_not_supported: unbound visual input; attach psd_media " | |
| "from the archived request before scoring or training" | |
| ) | |