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")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Cohee/fooocus_expansion-onnx") model = AutoModelForCausalLM.from_pretrained("Cohee/fooocus_expansion-onnx") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
Upload 6 files
Browse files
onnx/decoder_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87e979f4e6f2b07cb9ac47e893e2c53f5fe58f503ae38f5ff90704f0197851bf
|
| 3 |
+
size 499275976
|
onnx/decoder_model_merged.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2a955365080142a0c21abc3e2578fcf6418588bb914358ba975fc7d837daf46a
|
| 3 |
+
size 500799139
|
onnx/decoder_model_merged_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca94b8367d0aec480e1a83f7146121c743c6154f7cf16cc4f43cf41e560d9bd4
|
| 3 |
+
size 128315766
|
onnx/decoder_model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30372fe03f412a34a167947a326ecaba37065d27470656c107b871157aeaf19f
|
| 3 |
+
size 126556880
|
onnx/decoder_with_past_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9849bb4dab43c80c0a14b72f9d26931d9cddafdf68c1145b608c7dedc55e2d8d
|
| 3 |
+
size 499282782
|
onnx/decoder_with_past_model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d71976e10aff4b54827978751e684872bad5a0e33dafc4c63980739a5555d25b
|
| 3 |
+
size 126565928
|