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/generate_openapi_schema.py from roshikhan301/NEWONE1: direct link, hf CLI and curl.
- Browser
- Download file 402 Bytes
-
https://huggingface.co/roshikhan301/NEWONE1/resolve/main/scripts/generate_openapi_schema.py
- Command line
-
hf download hf://roshikhan301/NEWONE1/scripts/generate_openapi_schema.py
-
curl -L -o generate_openapi_schema.py https://huggingface.co/roshikhan301/NEWONE1/resolve/main/scripts/generate_openapi_schema.py
402 Bytes
| import json | |
| import os | |
| import sys | |
| def main(): | |
| # Change working directory to the repo root | |
| os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) | |
| from invokeai.app.api_app import app | |
| from invokeai.app.util.custom_openapi import get_openapi_func | |
| schema = get_openapi_func(app)() | |
| json.dump(schema, sys.stdout, indent=2) | |
| if __name__ == "__main__": | |
| main() | |