Instructions to use lsmpp/kontextrefiner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lsmpp/kontextrefiner with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lsmpp/kontextrefiner", 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
| name: Run Flax dependency tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "src/diffusers/**.py" | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| check_flax_dependencies: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.8" | |
| - name: Install dependencies | |
| run: | | |
| python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" | |
| python -m pip install --upgrade pip uv | |
| python -m uv pip install -e . | |
| python -m uv pip install "jax[cpu]>=0.2.16,!=0.3.2" | |
| python -m uv pip install "flax>=0.4.1" | |
| python -m uv pip install "jaxlib>=0.1.65" | |
| python -m uv pip install pytest | |
| - name: Check for soft dependencies | |
| run: | | |
| python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" | |
| pytest tests/others/test_dependencies.py | |