Instructions to use umm-maybe/image-generator-identifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use umm-maybe/image-generator-identifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="umm-maybe/image-generator-identifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("umm-maybe/image-generator-identifier") model = AutoModelForMultimodalLM.from_pretrained("umm-maybe/image-generator-identifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use umm-maybe/image-generator-identifier with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "umm-maybe/image-generator-identifier" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "umm-maybe/image-generator-identifier", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/umm-maybe/image-generator-identifier
- SGLang
How to use umm-maybe/image-generator-identifier 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 "umm-maybe/image-generator-identifier" \ --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": "umm-maybe/image-generator-identifier", "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 "umm-maybe/image-generator-identifier" \ --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": "umm-maybe/image-generator-identifier", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use umm-maybe/image-generator-identifier with Docker Model Runner:
docker model run hf.co/umm-maybe/image-generator-identifier
Upload 5 files
Browse filesFiles changed (5)
- preprocessor_config.jsonAdded+17
- special_tokens_map.jsonAdded+7
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+21
- vocab.txtAdded
1234567891011121314151617{ "do_normalize": true, "do_resize": true, "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "BlipImageProcessor", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "processor_class": "BlipProcessor", "size": 384}1234567{ "cls_token": "[CLS]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": "[UNK]"}123456789101112131415161718192021{ "cls_token": "[CLS]", "do_basic_tokenize": true, "do_lower_case": true, "mask_token": "[MASK]", "model_max_length": 512, "name_or_path": "bert-base-uncased", "never_split": null, "pad_token": "[PAD]", "processor_class": "BlipProcessor", "sep_token": "[SEP]", "special_tokens_map_file": null, "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]", "model_input_names": [ "input_ids", "attention_mask" ]}preprocessor_config.jsonAdded+17
special_tokens_map.jsonAdded+7
tokenizer.jsonAdded
tokenizer_config.jsonAdded+21
vocab.txtAdded