Image-Text-to-Text
Transformers
Safetensors
qwen3_5
anime
image-to-prompt
image-tagging
danbooru
qwen3.5
vision-language
conversational
Instructions to use damoncao/Anime_Image2Prompt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use damoncao/Anime_Image2Prompt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="damoncao/Anime_Image2Prompt") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("damoncao/Anime_Image2Prompt") model = AutoModelForMultimodalLM.from_pretrained("damoncao/Anime_Image2Prompt", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use damoncao/Anime_Image2Prompt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "damoncao/Anime_Image2Prompt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "damoncao/Anime_Image2Prompt", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/damoncao/Anime_Image2Prompt
- SGLang
How to use damoncao/Anime_Image2Prompt 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 "damoncao/Anime_Image2Prompt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "damoncao/Anime_Image2Prompt", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "damoncao/Anime_Image2Prompt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "damoncao/Anime_Image2Prompt", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use damoncao/Anime_Image2Prompt with Docker Model Runner:
docker model run hf.co/damoncao/Anime_Image2Prompt
Delete SHA256SUMS
Browse filesRemove redundant file
- SHA256SUMS +0 -17
SHA256SUMS
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 1 |
-
34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930 .gitattributes
|
| 2 |
-
273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80 chat_template.jinja
|
| 3 |
-
137bf1846d31c6a192563742fe779d4cdc70ace03f89c8ab75853bb1bd980011 config.json
|
| 4 |
-
774d3ef576350368f17c9d5840e58b45b6f96e1027d614c7a086e38a07bb1897 generation_config.json
|
| 5 |
-
0ec7a0f616ab7807fffdf79f8aad21099d745721902530019636ba4738387bb2 inference.py
|
| 6 |
-
52496bd91e81ff8f5dfdb2edc8b9985563af531a7db3c5250473033a36f1c2da inference_config.json
|
| 7 |
-
07226f7a7f661ef0cb3ce5fbef78f5cc8ee6952a430db07a4661c1c0a2bd57e7 images/01-regen.png
|
| 8 |
-
2a6f2ddca81021930896da8c21d776419e2d2a0b5f60557fdb1991a91a3821e7 images/01.png
|
| 9 |
-
abbeaaaf80623948a0980bc6f9ad062fef49babb2c803535735efc3d7425aa5a images/02-regen.png
|
| 10 |
-
98819176c7d08ba1981ee039af36e8769ae46073a7f7e15186dd2b506773a0d4 images/02.png
|
| 11 |
-
bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE
|
| 12 |
-
8e7b265c171b46ee7e3dd4809b3b1cfc933c40cbdbe5c976f499e654daa0be3b model.safetensors
|
| 13 |
-
04920fe4d2d3491ed36e324231199cf5c1576fa41a34e0eff432bbe1e86ce5d8 processor_config.json
|
| 14 |
-
598544c992ff9d934b44c7b01addf3dc1887e5b52f1cdf3882670970f538cc12 README.md
|
| 15 |
-
1b8b6fbefca746644cb6a0e0fc5d541d54689f21b1e26a4ce0d11155353a31c8 requirements.txt
|
| 16 |
-
06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523 tokenizer.json
|
| 17 |
-
2a364f7d378ea19bdeedb7ab23b3f57d661a8aca282532a6d8e9e38d2252d740 tokenizer_config.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|