Text-to-Image
Diffusers
Safetensors
English
Chinese
QwenImage21Pipeline
bitsandbytes
int8
image-generation
image-editing
rgba
8-bit precision
Instructions to use ixim/Image21-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ixim/Image21-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/Image21-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
Download tests/test_upload_auth.py from ixim/Image21-INT8: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/ixim/Image21-INT8/resolve/main/tests/test_upload_auth.py
- Command line
-
hf download hf://ixim/Image21-INT8/tests/test_upload_auth.py
-
curl -L -o test_upload_auth.py https://huggingface.co/ixim/Image21-INT8/resolve/main/tests/test_upload_auth.py
858 Bytes
| import os | |
| import unittest | |
| from unittest.mock import patch | |
| from scripts.upload import modelscope_access | |
| class CachedGitOnly: | |
| def get_token(): | |
| return 'cached-git-credential-not-an-api-token' | |
| def get_cookies(): | |
| return None | |
| class UploadAuthTests(unittest.TestCase): | |
| def test_cached_git_credential_cannot_authorize_api_upload(self): | |
| with patch.dict(os.environ, {}, clear=True): | |
| with self.assertRaisesRegex(RuntimeError, 'API'): | |
| modelscope_access(CachedGitOnly, 'iximbox') | |
| def test_explicit_sdk_token_is_selected(self): | |
| with patch.dict(os.environ, {'MODELSCOPE_API_TOKEN': 'test-sdk-token'}, clear=True): | |
| self.assertEqual(modelscope_access(CachedGitOnly, 'iximbox'), 'test-sdk-token') | |
| if __name__ == '__main__': | |
| unittest.main() | |