2023-08-04 13:28:41 +00:00
< div align = "center" >
< picture >
2023-08-04 17:18:07 +00:00
< source media = "(prefers-color-scheme: dark)" srcset = "https://raw.githubusercontent.com/finegrain-ai/refiners/main/assets/logo_dark.png" >
< source media = "(prefers-color-scheme: light)" srcset = "https://raw.githubusercontent.com/finegrain-ai/refiners/main/assets/logo_light.png" >
2023-08-04 13:28:41 +00:00
< img alt = "Finegrain Refiners Library" width = "352" height = "128" style = "max-width: 100%;" >
< / picture >
2024-02-02 13:48:33 +00:00
**The simplest way to train and run adapters on top of foundation models**
2024-08-23 15:39:09 +00:00
[**Manifesto** ](https://refine.rs/home/why/ ) |
[**Docs** ](https://refine.rs ) |
[**Guides** ](https://refine.rs/guides/adapting_sdxl/ ) |
[**Discussions** ](https://github.com/finegrain-ai/refiners/discussions ) |
[**Discord** ](https://discord.gg/mCmjNUVV7d )
2023-08-04 13:28:41 +00:00
______________________________________________________________________
2024-08-23 15:39:09 +00:00
[![dependencies - Rye ](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json )](https://github.com/astral-sh/rye)
[![linting - Ruff ](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json )](https://github.com/astral-sh/ruff)
[![packaging - Hatch ](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg )](https://github.com/pypa/hatch)
2023-08-04 13:28:41 +00:00
[![PyPI - Python Version ](https://img.shields.io/pypi/pyversions/refiners )](https://pypi.org/project/refiners/)
2024-08-23 15:39:09 +00:00
[![PyPI - Status ](https://badge.fury.io/py/refiners.svg )](https://pypi.org/project/refiners/)
[![license ](https://img.shields.io/badge/license-MIT-blue )](/LICENSE) \
2023-11-28 10:37:32 +00:00
[![code bounties ](https://img.shields.io/badge/code-bounties-blue )](https://finegrain.ai/bounties)
2024-08-23 15:39:09 +00:00
[![Discord ](https://img.shields.io/discord/1179456777406922913?logo=discord&logoColor=white&color=%235765F2 )](https://discord.gg/mCmjNUVV7d)
[![HuggingFace - Refiners ](https://img.shields.io/badge/refiners-ffd21e?logo=huggingface&labelColor=555 )](https://huggingface.co/refiners)
[![HuggingFace - Finegrain ](https://img.shields.io/badge/finegrain-ffd21e?logo=huggingface&labelColor=555 )](https://huggingface.co/finegrain)
2024-09-05 09:58:45 +00:00
[![ComfyUI Registry ](https://img.shields.io/badge/ComfyUI_Registry-comfyui--refiners-1a56db )](https://registry.comfy.org/publishers/finegrain/nodes/comfyui-refiners)
2024-08-23 15:39:09 +00:00
2023-08-04 13:28:41 +00:00
< / div >
2023-10-19 14:09:30 +00:00
## Latest News 🔥
2024-09-04 11:38:22 +00:00
- Added [ELLA ](https://arxiv.org/abs/2403.05135 ) for better prompts handling (contributed by [@ily-R ](https://github.com/ily-R ))
2024-08-27 09:44:44 +00:00
- Added the Box Segmenter all-in-one solution ([model](https://huggingface.co/finegrain/finegrain-box-segmenter), [HF Space ](https://huggingface.co/spaces/finegrain/finegrain-object-cutter ))
- Added [MVANet ](https://arxiv.org/abs/2404.07445 ) for high resolution segmentation
2024-08-12 10:04:49 +00:00
- Added [IC-Light ](https://github.com/lllyasviel/IC-Light ) to manipulate the illumination of images
2024-07-24 10:00:05 +00:00
- Added Multi Upscaler for high-resolution image generation, inspired from [Clarity Upscaler ](https://github.com/philz1337x/clarity-upscaler ) ([HF Space](https://huggingface.co/spaces/finegrain/enhancer))
2024-03-22 11:05:37 +00:00
- Added [HQ-SAM ](https://arxiv.org/abs/2306.01567 ) for high quality mask prediction with Segment Anything
2024-09-19 12:21:28 +00:00
- ...see past [releases ](https://github.com/finegrain-ai/refiners/releases )
2023-10-19 14:09:30 +00:00
2024-02-02 13:48:33 +00:00
## Installation
2023-10-19 14:09:30 +00:00
2024-02-02 13:48:33 +00:00
The current recommended way to install Refiners is from source using [Rye ](https://rye-up.com/ ):
2023-10-19 14:09:30 +00:00
```bash
2024-02-02 13:48:33 +00:00
git clone "git@github.com:finegrain-ai/refiners.git"
cd refiners
rye sync --all-features
2023-08-04 13:28:41 +00:00
```
2024-02-02 13:48:33 +00:00
## Documentation
2023-08-04 13:28:41 +00:00
2024-02-02 13:48:33 +00:00
Refiners comes with a MkDocs-based documentation website available at https://refine.rs. You will find there a [quick start guide ](https://refine.rs/getting-started/recommended/ ), a description of the [key concepts ](https://refine.rs/concepts/chain/ ), as well as in-depth foundation model adaptation [guides ](https://refine.rs/guides/adapting_sdxl/ ).
2023-08-04 13:28:41 +00:00
2024-09-19 12:21:28 +00:00
## Projects using Refiners
- [Finegrain Editor ](https://editor.finegrain.ai/signup?utm_source=github&utm_campaign=refiners ): use state-of-the-art visual AI skills to edit product photos
- [Visoid ](https://www.visoid.com/ ): AI-powered architectural visualization
2024-09-24 12:45:01 +00:00
- [brycedrennan/imaginAIry ](https://github.com/brycedrennan/imaginAIry ): Pythonic AI generation of images and videos
2024-09-24 12:46:44 +00:00
- [chloedia/layerdiffuse ](https://github.com/chloedia/layerdiffuse ): an implementation of [LayerDiffuse ](https://arxiv.org/abs/2402.17113v3 ) (foreground generation only)
2024-09-19 12:21:28 +00:00
2023-09-17 15:21:19 +00:00
## Awesome Adaptation Papers
If you're interested in understanding the diversity of use cases for foundation model adaptation (potentially beyond the specific adapters supported by Refiners), we suggest you take a look at these outstanding papers:
2024-02-02 13:48:33 +00:00
- [ControlNet ](https://arxiv.org/abs/2302.05543 )
- [T2I-Adapter ](https://arxiv.org/abs/2302.08453 )
- [IP-Adapter ](https://arxiv.org/abs/2308.06721 )
2023-09-17 15:21:19 +00:00
- [Medical SAM Adapter ](https://arxiv.org/abs/2304.12620 )
- [3DSAM-adapter ](https://arxiv.org/abs/2306.13465 )
- [SAM-adapter ](https://arxiv.org/abs/2304.09148 )
- [Cross Modality Attention Adapter ](https://arxiv.org/abs/2307.01124 )
- [UniAdapter ](https://arxiv.org/abs/2302.06605 )
2023-08-04 13:28:41 +00:00
## Credits
We took inspiration from these great projects:
- [tinygrad ](https://github.com/tinygrad/tinygrad ) - For something between PyTorch and [karpathy/micrograd ](https://github.com/karpathy/micrograd )
- [Composer ](https://github.com/mosaicml/composer ) - A PyTorch Library for Efficient Neural Network Training
- [Keras ](https://github.com/keras-team/keras ) - Deep Learning for humans
## Citation
```bibtex
@misc {the-finegrain-team-2023-refiners,
author = {Benjamin Trom and Pierre Chapuis and Cédric Deltheil},
2024-02-01 17:31:50 +00:00
title = {Refiners: The simplest way to train and run adapters on top of foundation models},
2023-08-04 13:28:41 +00:00
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/finegrain-ai/refiners}}
}
```