Instructions to use Cohee/fooocus_expansion-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Cohee/fooocus_expansion-onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Cohee/fooocus_expansion-onnx")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Cohee/fooocus_expansion-onnx") model = AutoModelForCausalLM.from_pretrained("Cohee/fooocus_expansion-onnx", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Cohee/fooocus_expansion-onnx with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Cohee/fooocus_expansion-onnx" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cohee/fooocus_expansion-onnx", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Cohee/fooocus_expansion-onnx
- SGLang
How to use Cohee/fooocus_expansion-onnx 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 "Cohee/fooocus_expansion-onnx" \ --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": "Cohee/fooocus_expansion-onnx", "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 "Cohee/fooocus_expansion-onnx" \ --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": "Cohee/fooocus_expansion-onnx", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Cohee/fooocus_expansion-onnx with Docker Model Runner:
docker model run hf.co/Cohee/fooocus_expansion-onnx
Download onnx/decoder_model_quantized.onnx from Cohee/fooocus_expansion-onnx: direct link, hf CLI and curl.
- Browser
- Download file 126 MB
-
https://huggingface.co/Cohee/fooocus_expansion-onnx/resolve/main/onnx/decoder_model_quantized.onnx
- Command line
-
hf download hf://Cohee/fooocus_expansion-onnx/onnx/decoder_model_quantized.onnx
-
curl -L -o decoder_model_quantized.onnx https://huggingface.co/Cohee/fooocus_expansion-onnx/resolve/main/onnx/decoder_model_quantized.onnx
126 MB
- Xet hash:
- 3e5922f2cbf8c8f1ef1be59759fd022f7ff8306f2ef2299e92ab5236b532eed0
- Size of remote file:
- 126 MB
- SHA256:
- c39b2267a42c786cef504041aa3f64648f7689c49cb9830f68b712796aeec4df
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.