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 .github/workflows/python-checks.yml from roshikhan301/NEWONE1: direct link, hf CLI and curl.
- Browser
- Download file 2.08 kB
-
https://huggingface.co/roshikhan301/NEWONE1/resolve/main/.github/workflows/python-checks.yml
- Command line
-
hf download hf://roshikhan301/NEWONE1/.github/workflows/python-checks.yml
-
curl -L -o python-checks.yml https://huggingface.co/roshikhan301/NEWONE1/resolve/main/.github/workflows/python-checks.yml
2.08 kB
| # Runs python code quality checks. | |
| # | |
| # Checks for changes to python files before running the checks. | |
| # If always_run is true, always runs the checks. | |
| # | |
| # TODO: Add mypy or pyright to the checks. | |
| name: 'python checks' | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| types: | |
| - 'ready_for_review' | |
| - 'opened' | |
| - 'synchronize' | |
| merge_group: | |
| workflow_dispatch: | |
| inputs: | |
| always_run: | |
| description: 'Always run the checks' | |
| required: true | |
| type: boolean | |
| default: true | |
| workflow_call: | |
| inputs: | |
| always_run: | |
| description: 'Always run the checks' | |
| required: true | |
| type: boolean | |
| default: true | |
| jobs: | |
| python-checks: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 # expected run time: <1 min | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: check for changed python files | |
| if: ${{ inputs.always_run != true }} | |
| id: changed-files | |
| uses: tj-actions/changed-files@v42 | |
| with: | |
| files_yaml: | | |
| python: | |
| - 'pyproject.toml' | |
| - 'invokeai/**' | |
| - '!invokeai/frontend/web/**' | |
| - 'tests/**' | |
| - name: setup python | |
| if: ${{ steps.changed-files.outputs.python_any_changed == 'true' || inputs.always_run == true }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: install ruff | |
| if: ${{ steps.changed-files.outputs.python_any_changed == 'true' || inputs.always_run == true }} | |
| run: pip install ruff==0.6.0 | |
| shell: bash | |
| - name: ruff check | |
| if: ${{ steps.changed-files.outputs.python_any_changed == 'true' || inputs.always_run == true }} | |
| run: ruff check --output-format=github . | |
| shell: bash | |
| - name: ruff format | |
| if: ${{ steps.changed-files.outputs.python_any_changed == 'true' || inputs.always_run == true }} | |
| run: ruff format --check . | |
| shell: bash | |