Instructions to use ixim/ERNIE-Image-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ixim/ERNIE-Image-INT8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ixim/ERNIE-Image-INT8", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
| { | |
| "device": "cuda", | |
| "base_model_dir": "Baidu/ERNIE-Image", | |
| "base_model_hub_id": "Baidu/ERNIE-Image", | |
| "base_model_relation": "quantized", | |
| "components": [ | |
| { | |
| "name": "transformer", | |
| "backend": "quanto", | |
| "precision": "int8", | |
| "enabled": true, | |
| "skipped_modules": [ | |
| "norm", | |
| "layer_norm", | |
| "ln", | |
| "embed_tokens", | |
| "lm_head", | |
| "proj_out" | |
| ] | |
| }, | |
| { | |
| "name": "text_encoder", | |
| "backend": "none", | |
| "precision": "bfloat16", | |
| "enabled": false, | |
| "skipped_modules": [] | |
| }, | |
| { | |
| "name": "pe", | |
| "backend": "none", | |
| "precision": "bfloat16", | |
| "enabled": false, | |
| "skipped_modules": [] | |
| } | |
| ] | |
| } |