Instructions to use roshikhan301/NEWONE1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use roshikhan301/NEWONE1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("roshikhan301/NEWONE1", 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
Download scripts/probe-model.py from roshikhan301/NEWONE1: direct link, hf CLI and curl.
- Browser
- Download file 916 Bytes
-
https://huggingface.co/roshikhan301/NEWONE1/resolve/main/scripts/probe-model.py
- Command line
-
hf download hf://roshikhan301/NEWONE1/scripts/probe-model.py
-
curl -L -o probe-model.py https://huggingface.co/roshikhan301/NEWONE1/resolve/main/scripts/probe-model.py
916 Bytes
| #!/bin/env python | |
| """Little command-line utility for probing a model on disk.""" | |
| import argparse | |
| from pathlib import Path | |
| from typing import get_args | |
| from invokeai.backend.model_hash.model_hash import HASHING_ALGORITHMS | |
| from invokeai.backend.model_manager import InvalidModelConfigException, ModelProbe | |
| algos = ", ".join(set(get_args(HASHING_ALGORITHMS))) | |
| parser = argparse.ArgumentParser(description="Probe model type") | |
| parser.add_argument( | |
| "model_path", | |
| type=Path, | |
| nargs="+", | |
| ) | |
| parser.add_argument( | |
| "--hash_algo", | |
| type=str, | |
| default="blake3_single", | |
| help=f"Hashing algorithm to use (default: blake3_single), one of: {algos}", | |
| ) | |
| args = parser.parse_args() | |
| for path in args.model_path: | |
| try: | |
| info = ModelProbe.probe(path, hash_algo=args.hash_algo) | |
| print(f"{path}:{info.model_dump_json(indent=4)}") | |
| except InvalidModelConfigException as exc: | |
| print(exc) | |