carefree-creator


Namecarefree-creator JSON
Version 0.2.10 PyPI version JSON
download
home_page
SummaryAn AI-powered creator for everyone.
upload_time2023-11-15 03:31:23
maintainer
docs_urlNone
authorcarefree0910
requires_python
license
keywords python carefree-learn pytorch
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![noli-creator](./static/images/social-image.jpg)

An open sourced, AI-powered creator for everyone.

> * This is the backend project of the `Creator` product. If you are looking for the **WebUI** codes, you may checkout the [`carefree-drawboard`](https://github.com/carefree0910/carefree-drawboard) 🎨 project.
>
> * Most of the contents have been moved to the [Wiki](https://github.com/carefree0910/carefree-creator/wiki) page.

<div align="center">

### [Wiki](https://github.com/carefree0910/carefree-creator/wiki) | [WebUI Codes](https://github.com/carefree0910/carefree-drawboard)

<div align="left">

# Installation

`carefree-creator` is built on top of `carefree-learn`, and requires:
- `Python>=3.8`
- `pytorch>=1.12.0`. Please refer to [PyTorch](https://pytorch.org/get-started/locally/)'s official website, and it is highly recommended to pre-install PyTorch with conda.

## Hardware Requirements

> Related issue: [#10](https://github.com/carefree0910/carefree-creator/issues/10).

This project will eat up 11~13 GB of GPU RAM if no modifications are made, because it actually integrates FIVE different SD versions together, and many other models as well. 🤣

There are two ways that can reduce the usage of GPU RAM - lazy loading and partial loading, see the following [`Run`](#run) section for more details.

## pip installation

```bash
pip install carefree-creator
```

If you are interested in the latest features, you may use `pip` to install from source as well:

```bash
git clone https://github.com/carefree0910/carefree-creator.git
cd carefree-creator
pip install -e .
```

### Run

`carefree-creator` builds a CLI for you to setup your local service. For instance, we can:

```bash
cfcreator serve
```

If you don't have an NVIDIA GPU (e.g. mac), you may try:

```bash
cfcreator serve --cpu
```

If you are using your GPU-powered laptop, you may try:

```bash
cfcreator serve --limit 1
```

> The `--limit` flag is used to limit the number of loading models. By specifying `1`, only the executing model will be loaded, and other models will stay on your disk.
>
> See [#10](https://github.com/carefree0910/carefree-creator/issues/10#issuecomment-1520661893) for more details.

If you have plenty of RAM resources but your GPU RAM is not large enough, you may try:

```bash
cfcreator serve --lazy
```

> With the `--lazy` flag, the models will be loaded to RAM, and only the executing model will be moved to GPU RAM.
> 
> So as an exchange, your RAM will be eaten up! 🤣

If you only want to try the SD basic endpoints, you may use:

```bash
cfcreator serve --focus sd.base
```

And if you only want to try the SD anime endpoints, you may use:

```bash
cfcreator serve --focus sd.anime
```

More usages could be found by:

```bash
cfcreator serve --help
```

## Docker

### Prepare

```bash
export TAG_NAME=cfcreator
git clone https://github.com/carefree0910/carefree-creator.git
cd carefree-creator
```

### Build

```bash
docker build -t $TAG_NAME .
```

If your internet environment lands in China, it might be faster to build with `Dockerfile.cn`:

```bash
docker build -t $TAG_NAME -f Dockerfile.cn .
```

### Run

```bash
docker run --gpus all --rm -p 8123:8123 $TAG_NAME:latest
```

# Credits

- [Stable Diffusion](https://github.com/CompVis/stable-diffusion), the foundation of various generation methods.
- [Stable Diffusion from runwayml](https://github.com/runwayml/stable-diffusion), the adopted SD-inpainting method.
- [Waifu Diffusion](https://github.com/harubaru/waifu-diffusion), the anime-finetuned version of Stable Diffusion.
- [Real ESRGAN](https://github.com/xinntao/Real-ESRGAN), the adopted Super Resolution methods.
- [Latent Diffusion](https://github.com/CompVis/latent-diffusion), the adopted Inpainting & Landscape Synthesis method.
- [carefree-learn](https://github.com/carefree0910/carefree-learn), the code base that has re-implemented all the models above and provided clean and handy APIs.
- And You! Thank you for watching!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "carefree-creator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python carefree-learn PyTorch",
    "author": "carefree0910",
    "author_email": "syameimaru.saki@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9a/57/68d74b2bf240d35f38dc4533b0be2040c6887ea833dc863653a5ce00b560/carefree-creator-0.2.10.tar.gz",
    "platform": null,
    "description": "![noli-creator](./static/images/social-image.jpg)\r\n\r\nAn open sourced, AI-powered creator for everyone.\r\n\r\n> * This is the backend project of the `Creator` product. If you are looking for the **WebUI** codes, you may checkout the [`carefree-drawboard`](https://github.com/carefree0910/carefree-drawboard) \ud83c\udfa8 project.\r\n>\r\n> * Most of the contents have been moved to the [Wiki](https://github.com/carefree0910/carefree-creator/wiki) page.\r\n\r\n<div align=\"center\">\r\n\r\n### [Wiki](https://github.com/carefree0910/carefree-creator/wiki) | [WebUI Codes](https://github.com/carefree0910/carefree-drawboard)\r\n\r\n<div align=\"left\">\r\n\r\n# Installation\r\n\r\n`carefree-creator` is built on top of `carefree-learn`, and requires:\r\n- `Python>=3.8`\r\n- `pytorch>=1.12.0`. Please refer to [PyTorch](https://pytorch.org/get-started/locally/)'s official website, and it is highly recommended to pre-install PyTorch with conda.\r\n\r\n## Hardware Requirements\r\n\r\n> Related issue: [#10](https://github.com/carefree0910/carefree-creator/issues/10).\r\n\r\nThis project will eat up 11~13 GB of GPU RAM if no modifications are made, because it actually integrates FIVE different SD versions together, and many other models as well. \ud83e\udd23\r\n\r\nThere are two ways that can reduce the usage of GPU RAM - lazy loading and partial loading, see the following [`Run`](#run) section for more details.\r\n\r\n## pip installation\r\n\r\n```bash\r\npip install carefree-creator\r\n```\r\n\r\nIf you are interested in the latest features, you may use `pip` to install from source as well:\r\n\r\n```bash\r\ngit clone https://github.com/carefree0910/carefree-creator.git\r\ncd carefree-creator\r\npip install -e .\r\n```\r\n\r\n### Run\r\n\r\n`carefree-creator` builds a CLI for you to setup your local service. For instance, we can:\r\n\r\n```bash\r\ncfcreator serve\r\n```\r\n\r\nIf you don't have an NVIDIA GPU (e.g. mac), you may try:\r\n\r\n```bash\r\ncfcreator serve --cpu\r\n```\r\n\r\nIf you are using your GPU-powered laptop, you may try:\r\n\r\n```bash\r\ncfcreator serve --limit 1\r\n```\r\n\r\n> The `--limit` flag is used to limit the number of loading models. By specifying `1`, only the executing model will be loaded, and other models will stay on your disk.\r\n>\r\n> See [#10](https://github.com/carefree0910/carefree-creator/issues/10#issuecomment-1520661893) for more details.\r\n\r\nIf you have plenty of RAM resources but your GPU RAM is not large enough, you may try:\r\n\r\n```bash\r\ncfcreator serve --lazy\r\n```\r\n\r\n> With the `--lazy` flag, the models will be loaded to RAM, and only the executing model will be moved to GPU RAM.\r\n> \r\n> So as an exchange, your RAM will be eaten up! \ud83e\udd23\r\n\r\nIf you only want to try the SD basic endpoints, you may use:\r\n\r\n```bash\r\ncfcreator serve --focus sd.base\r\n```\r\n\r\nAnd if you only want to try the SD anime endpoints, you may use:\r\n\r\n```bash\r\ncfcreator serve --focus sd.anime\r\n```\r\n\r\nMore usages could be found by:\r\n\r\n```bash\r\ncfcreator serve --help\r\n```\r\n\r\n## Docker\r\n\r\n### Prepare\r\n\r\n```bash\r\nexport TAG_NAME=cfcreator\r\ngit clone https://github.com/carefree0910/carefree-creator.git\r\ncd carefree-creator\r\n```\r\n\r\n### Build\r\n\r\n```bash\r\ndocker build -t $TAG_NAME .\r\n```\r\n\r\nIf your internet environment lands in China, it might be faster to build with `Dockerfile.cn`:\r\n\r\n```bash\r\ndocker build -t $TAG_NAME -f Dockerfile.cn .\r\n```\r\n\r\n### Run\r\n\r\n```bash\r\ndocker run --gpus all --rm -p 8123:8123 $TAG_NAME:latest\r\n```\r\n\r\n# Credits\r\n\r\n- [Stable Diffusion](https://github.com/CompVis/stable-diffusion), the foundation of various generation methods.\r\n- [Stable Diffusion from runwayml](https://github.com/runwayml/stable-diffusion), the adopted SD-inpainting method.\r\n- [Waifu Diffusion](https://github.com/harubaru/waifu-diffusion), the anime-finetuned version of Stable Diffusion.\r\n- [Real ESRGAN](https://github.com/xinntao/Real-ESRGAN), the adopted Super Resolution methods.\r\n- [Latent Diffusion](https://github.com/CompVis/latent-diffusion), the adopted Inpainting & Landscape Synthesis method.\r\n- [carefree-learn](https://github.com/carefree0910/carefree-learn), the code base that has re-implemented all the models above and provided clean and handy APIs.\r\n- And You! Thank you for watching!\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "An AI-powered creator for everyone.",
    "version": "0.2.10",
    "project_urls": null,
    "split_keywords": [
        "python",
        "carefree-learn",
        "pytorch"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9a5768d74b2bf240d35f38dc4533b0be2040c6887ea833dc863653a5ce00b560",
                "md5": "82cf6ef10078081f46015d1845bf631f",
                "sha256": "af5d2dea082896ee5b49d3eb7a05c9a5cc7fff6dec01f979355bee445bae1633"
            },
            "downloads": -1,
            "filename": "carefree-creator-0.2.10.tar.gz",
            "has_sig": false,
            "md5_digest": "82cf6ef10078081f46015d1845bf631f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 59381,
            "upload_time": "2023-11-15T03:31:23",
            "upload_time_iso_8601": "2023-11-15T03:31:23.799027Z",
            "url": "https://files.pythonhosted.org/packages/9a/57/68d74b2bf240d35f38dc4533b0be2040c6887ea833dc863653a5ce00b560/carefree-creator-0.2.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-15 03:31:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "carefree-creator"
}
        
Elapsed time: 0.24761s