Instructions to use AEUPH/moss4gb with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AEUPH/moss4gb with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AEUPH/moss4gb", 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 conftest.py from AEUPH/moss4gb: direct link, hf CLI and curl.
- Browser
- Download file 803 Bytes
-
https://huggingface.co/AEUPH/moss4gb/resolve/main/conftest.py
- Command line
-
hf download hf://AEUPH/moss4gb/conftest.py
-
curl -L -o conftest.py https://huggingface.co/AEUPH/moss4gb/resolve/main/conftest.py
803 Bytes
| import sys | |
| from pathlib import Path | |
| import pytest | |
| ROOT = Path(__file__).resolve().parent | |
| sys.path.insert(0, str(ROOT)) | |
| from moss4gb.paths import default_model_dir # noqa: E402 | |
| # Resolved, not relative: a versioned snapshot shares the weights instead of | |
| # duplicating them, and the suite should still find them there. | |
| MODEL_DIR = default_model_dir() | |
| def model_dir() -> Path: | |
| if not (MODEL_DIR / "transformer" / "config.json").is_file(): | |
| pytest.skip("model files not downloaded") | |
| return MODEL_DIR | |
| def has_dit(model_dir) -> Path: | |
| shards = sorted((model_dir / "transformer").glob("diffusion_pytorch_model-*.safetensors")) | |
| if not shards: | |
| pytest.skip("DiT weights not downloaded") | |
| return model_dir | |