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
Download diffusers/src/diffusers.egg-info/PKG-INFO from lsmpp/kontextrefiner: direct link, hf CLI and curl.
- Browser
- Download file 20.3 kB
-
https://huggingface.co/lsmpp/kontextrefiner/resolve/main/diffusers/src/diffusers.egg-info/PKG-INFO
- Command line
-
hf download hf://lsmpp/kontextrefiner/diffusers/src/diffusers.egg-info/PKG-INFO
-
curl -L -o PKG-INFO https://huggingface.co/lsmpp/kontextrefiner/resolve/main/diffusers/src/diffusers.egg-info/PKG-INFO
20.3 kB
| Metadata-Version: 2.4 | |
| Name: diffusers | |
| Version: 0.35.0.dev0 | |
| Summary: State-of-the-art diffusion in PyTorch and JAX. | |
| Home-page: https://github.com/huggingface/diffusers | |
| Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors) | |
| Author-email: diffusers@huggingface.co | |
| License: Apache 2.0 License | |
| Keywords: deep learning diffusion jax pytorch stable diffusion audioldm | |
| Classifier: Development Status :: 5 - Production/Stable | |
| Classifier: Intended Audience :: Developers | |
| Classifier: Intended Audience :: Education | |
| Classifier: Intended Audience :: Science/Research | |
| Classifier: License :: OSI Approved :: Apache Software License | |
| Classifier: Operating System :: OS Independent | |
| Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence | |
| Classifier: Programming Language :: Python :: 3 | |
| Classifier: Programming Language :: Python :: 3.8 | |
| Classifier: Programming Language :: Python :: 3.9 | |
| Classifier: Programming Language :: Python :: 3.10 | |
| Classifier: Programming Language :: Python :: 3.11 | |
| Classifier: Programming Language :: Python :: 3.12 | |
| Classifier: Programming Language :: Python :: 3.13 | |
| Requires-Python: >=3.8.0 | |
| Description-Content-Type: text/markdown | |
| License-File: LICENSE | |
| Requires-Dist: importlib_metadata | |
| Requires-Dist: filelock | |
| Requires-Dist: huggingface-hub>=0.27.0 | |
| Requires-Dist: numpy | |
| Requires-Dist: regex!=2019.12.17 | |
| Requires-Dist: requests | |
| Requires-Dist: safetensors>=0.3.1 | |
| Requires-Dist: Pillow | |
| Provides-Extra: quality | |
| Requires-Dist: urllib3<=2.0.0; extra == "quality" | |
| Requires-Dist: isort>=5.5.4; extra == "quality" | |
| Requires-Dist: ruff==0.9.10; extra == "quality" | |
| Requires-Dist: hf-doc-builder>=0.3.0; extra == "quality" | |
| Provides-Extra: docs | |
| Requires-Dist: hf-doc-builder>=0.3.0; extra == "docs" | |
| Provides-Extra: training | |
| Requires-Dist: accelerate>=0.31.0; extra == "training" | |
| Requires-Dist: datasets; extra == "training" | |
| Requires-Dist: protobuf<4,>=3.20.3; extra == "training" | |
| Requires-Dist: tensorboard; extra == "training" | |
| Requires-Dist: Jinja2; extra == "training" | |
| Requires-Dist: peft>=0.15.0; extra == "training" | |
| Provides-Extra: test | |
| Requires-Dist: compel==0.1.8; extra == "test" | |
| Requires-Dist: GitPython<3.1.19; extra == "test" | |
| Requires-Dist: datasets; extra == "test" | |
| Requires-Dist: Jinja2; extra == "test" | |
| Requires-Dist: invisible-watermark>=0.2.0; extra == "test" | |
| Requires-Dist: k-diffusion==0.0.12; extra == "test" | |
| Requires-Dist: librosa; extra == "test" | |
| Requires-Dist: parameterized; extra == "test" | |
| Requires-Dist: pytest; extra == "test" | |
| Requires-Dist: pytest-timeout; extra == "test" | |
| Requires-Dist: pytest-xdist; extra == "test" | |
| Requires-Dist: requests-mock==1.10.0; extra == "test" | |
| Requires-Dist: safetensors>=0.3.1; extra == "test" | |
| Requires-Dist: sentencepiece!=0.1.92,>=0.1.91; extra == "test" | |
| Requires-Dist: scipy; extra == "test" | |
| Requires-Dist: tiktoken>=0.7.0; extra == "test" | |
| Requires-Dist: torchvision; extra == "test" | |
| Requires-Dist: transformers>=4.41.2; extra == "test" | |
| Requires-Dist: phonemizer; extra == "test" | |
| Provides-Extra: torch | |
| Requires-Dist: torch>=1.4; extra == "torch" | |
| Requires-Dist: accelerate>=0.31.0; extra == "torch" | |
| Provides-Extra: bitsandbytes | |
| Requires-Dist: bitsandbytes>=0.43.3; extra == "bitsandbytes" | |
| Requires-Dist: accelerate>=0.31.0; extra == "bitsandbytes" | |
| Provides-Extra: gguf | |
| Requires-Dist: gguf>=0.10.0; extra == "gguf" | |
| Requires-Dist: accelerate>=0.31.0; extra == "gguf" | |
| Provides-Extra: optimum-quanto | |
| Requires-Dist: optimum_quanto>=0.2.6; extra == "optimum-quanto" | |
| Requires-Dist: accelerate>=0.31.0; extra == "optimum-quanto" | |
| Provides-Extra: torchao | |
| Requires-Dist: torchao>=0.7.0; extra == "torchao" | |
| Requires-Dist: accelerate>=0.31.0; extra == "torchao" | |
| Provides-Extra: flax | |
| Requires-Dist: jax>=0.4.1; extra == "flax" | |
| Requires-Dist: jaxlib>=0.4.1; extra == "flax" | |
| Requires-Dist: flax>=0.4.1; extra == "flax" | |
| Provides-Extra: dev | |
| Requires-Dist: urllib3<=2.0.0; extra == "dev" | |
| Requires-Dist: isort>=5.5.4; extra == "dev" | |
| Requires-Dist: ruff==0.9.10; extra == "dev" | |
| Requires-Dist: hf-doc-builder>=0.3.0; extra == "dev" | |
| Requires-Dist: compel==0.1.8; extra == "dev" | |
| Requires-Dist: GitPython<3.1.19; extra == "dev" | |
| Requires-Dist: datasets; extra == "dev" | |
| Requires-Dist: Jinja2; extra == "dev" | |
| Requires-Dist: invisible-watermark>=0.2.0; extra == "dev" | |
| Requires-Dist: k-diffusion==0.0.12; extra == "dev" | |
| Requires-Dist: librosa; extra == "dev" | |
| Requires-Dist: parameterized; extra == "dev" | |
| Requires-Dist: pytest; extra == "dev" | |
| Requires-Dist: pytest-timeout; extra == "dev" | |
| Requires-Dist: pytest-xdist; extra == "dev" | |
| Requires-Dist: requests-mock==1.10.0; extra == "dev" | |
| Requires-Dist: safetensors>=0.3.1; extra == "dev" | |
| Requires-Dist: sentencepiece!=0.1.92,>=0.1.91; extra == "dev" | |
| Requires-Dist: scipy; extra == "dev" | |
| Requires-Dist: tiktoken>=0.7.0; extra == "dev" | |
| Requires-Dist: torchvision; extra == "dev" | |
| Requires-Dist: transformers>=4.41.2; extra == "dev" | |
| Requires-Dist: phonemizer; extra == "dev" | |
| Requires-Dist: accelerate>=0.31.0; extra == "dev" | |
| Requires-Dist: datasets; extra == "dev" | |
| Requires-Dist: protobuf<4,>=3.20.3; extra == "dev" | |
| Requires-Dist: tensorboard; extra == "dev" | |
| Requires-Dist: Jinja2; extra == "dev" | |
| Requires-Dist: peft>=0.15.0; extra == "dev" | |
| Requires-Dist: hf-doc-builder>=0.3.0; extra == "dev" | |
| Requires-Dist: torch>=1.4; extra == "dev" | |
| Requires-Dist: accelerate>=0.31.0; extra == "dev" | |
| Requires-Dist: jax>=0.4.1; extra == "dev" | |
| Requires-Dist: jaxlib>=0.4.1; extra == "dev" | |
| Requires-Dist: flax>=0.4.1; extra == "dev" | |
| Dynamic: author | |
| Dynamic: author-email | |
| Dynamic: classifier | |
| Dynamic: description | |
| Dynamic: description-content-type | |
| Dynamic: home-page | |
| Dynamic: keywords | |
| Dynamic: license | |
| Dynamic: license-file | |
| Dynamic: provides-extra | |
| Dynamic: requires-dist | |
| Dynamic: requires-python | |
| Dynamic: summary | |
| <!--- | |
| Copyright 2022 - The HuggingFace Team. All rights reserved. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| --> | |
| <p align="center"> | |
| <br> | |
| <img src="https://raw.githubusercontent.com/huggingface/diffusers/main/docs/source/en/imgs/diffusers_library.jpg" width="400"/> | |
| <br> | |
| <p> | |
| <p align="center"> | |
| <a href="https://github.com/huggingface/diffusers/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/huggingface/datasets.svg?color=blue"></a> | |
| <a href="https://github.com/huggingface/diffusers/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/diffusers.svg"></a> | |
| <a href="https://pepy.tech/project/diffusers"><img alt="GitHub release" src="https://static.pepy.tech/badge/diffusers/month"></a> | |
| <a href="CODE_OF_CONDUCT.md"><img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg"></a> | |
| <a href="https://twitter.com/diffuserslib"><img alt="X account" src="https://img.shields.io/twitter/url/https/twitter.com/diffuserslib.svg?style=social&label=Follow%20%40diffuserslib"></a> | |
| </p> | |
| 🤗 Diffusers is the go-to library for state-of-the-art pretrained diffusion models for generating images, audio, and even 3D structures of molecules. Whether you're looking for a simple inference solution or training your own diffusion models, 🤗 Diffusers is a modular toolbox that supports both. Our library is designed with a focus on | |
| ``` | |
| With `conda` (maintained by the community): | |
| ```sh | |
| conda install -c conda-forge diffusers | |
| ``` | |
| ### Flax | |
| With `pip` (official package): | |
| ```bash | |
| pip install --upgrade diffusers[flax] | |
| ``` | |
| ### Apple Silicon (M1/M2) support | |
| Please refer to the | |
| ``` | |
| You can also dig into the models and schedulers toolbox to build your own diffusion system: | |
| ```python | |
| from diffusers import DDPMScheduler, UNet2DModel | |
| from PIL import Image | |
| import torch | |
| scheduler = DDPMScheduler.from_pretrained("google/ddpm-cat-256") | |
| model = UNet2DModel.from_pretrained("google/ddpm-cat-256").to("cuda") | |
| scheduler.set_timesteps(50) | |
| sample_size = model.config.sample_size | |
| noise = torch.randn((1, 3, sample_size, sample_size), device="cuda") | |
| input = noise | |
| for t in scheduler.timesteps: | |
| with torch.no_grad(): | |
| noisy_residual = model(input, t).sample | |
| prev_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample | |
| input = prev_noisy_sample | |
| image = (input / 2 + 0.5).clamp(0, 1) | |
| image = image.cpu().permute(0, 2, 3, 1).numpy()[0] | |
| image = Image.fromarray((image * 255).round().astype("uint8")) | |
| image | |
| ``` | |
| Check out the | |