Instructions to use akshan-main/tiny-ernie-image-modular-pipe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use akshan-main/tiny-ernie-image-modular-pipe with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("akshan-main/tiny-ernie-image-modular-pipe", 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
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": null, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "<|endoftext|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": null, | |
| "pre_tokenizer": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": false, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "post_processor": { | |
| "type": "TemplateProcessing", | |
| "single": [ | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| } | |
| ], | |
| "pair": [ | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "B", | |
| "type_id": 1 | |
| } | |
| } | |
| ], | |
| "special_tokens": {} | |
| }, | |
| "decoder": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": true, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "model": { | |
| "type": "BPE", | |
| "dropout": null, | |
| "unk_token": "<|endoftext|>", | |
| "continuing_subword_prefix": null, | |
| "end_of_word_suffix": null, | |
| "fuse_unk": false, | |
| "byte_fallback": false, | |
| "ignore_merges": false, | |
| "vocab": { | |
| "<|endoftext|>": 0, | |
| "H": 1, | |
| "a": 2, | |
| "d": 3, | |
| "e": 4, | |
| "h": 5, | |
| "i": 6, | |
| "l": 7, | |
| "o": 8, | |
| "r": 9, | |
| "s": 10, | |
| "t": 11, | |
| "w": 12, | |
| "Ġ": 13, | |
| "is": 14, | |
| "Ġt": 15, | |
| "He": 16, | |
| "es": 17, | |
| "his": 18, | |
| "ld": 19, | |
| "ll": 20, | |
| "or": 21, | |
| "wor": 22, | |
| "Ġa": 23, | |
| "Ġis": 24, | |
| "Ġwor": 25, | |
| "Ġtes": 26, | |
| "Ġthis": 27, | |
| "Hell": 28, | |
| "Ġworld": 29, | |
| "Ġtest": 30, | |
| "Hello": 31 | |
| }, | |
| "merges": [ | |
| [ | |
| "i", | |
| "s" | |
| ], | |
| [ | |
| "Ġ", | |
| "t" | |
| ], | |
| [ | |
| "H", | |
| "e" | |
| ], | |
| [ | |
| "e", | |
| "s" | |
| ], | |
| [ | |
| "h", | |
| "is" | |
| ], | |
| [ | |
| "l", | |
| "d" | |
| ], | |
| [ | |
| "l", | |
| "l" | |
| ], | |
| [ | |
| "o", | |
| "r" | |
| ], | |
| [ | |
| "w", | |
| "or" | |
| ], | |
| [ | |
| "Ġ", | |
| "a" | |
| ], | |
| [ | |
| "Ġ", | |
| "is" | |
| ], | |
| [ | |
| "Ġ", | |
| "wor" | |
| ], | |
| [ | |
| "Ġt", | |
| "es" | |
| ], | |
| [ | |
| "Ġt", | |
| "his" | |
| ], | |
| [ | |
| "He", | |
| "ll" | |
| ], | |
| [ | |
| "Ġwor", | |
| "ld" | |
| ], | |
| [ | |
| "Ġtes", | |
| "t" | |
| ], | |
| [ | |
| "Hell", | |
| "o" | |
| ] | |
| ] | |
| } | |
| } |