Introducing Carefree-Creator: An Open-Source, AI-Powered Creative Tool
Carefree-creator is an innovative, open-source project designed to tap into the power of artificial intelligence, facilitating creative endeavors for anyone interested. As the backend component of the Creator product suite, carefree-creator is essential to enabling robust, creative applications. If you're looking for the web-based user interface, you should explore the carefree-drawboard project, which complements this backend technology.
What You Need to Know
Carefree-creator leverages the capabilities of carefree-learn, requiring certain software specifications to function:
- A Python version of 3.8 or higher.
- PyTorch version 1.12.0 or higher. It is recommended to pre-install PyTorch via conda, which you can find on PyTorch's official website.
Hardware Considerations
This project demands a significant amount of GPU RAM—11 to 13 GB—due to its integration of five different Stable Diffusion versions and several other models. However, it offers strategies to mitigate high GPU RAM usage, including lazy loading and partial loading techniques.
Installing Carefree-Creator
Using pip, you can easily install carefree-creator:
pip install carefree-creator
For those eager to access the latest features, you can install directly from the source:
git clone https://github.com/carefree0910/carefree-creator.git
cd carefree-creator
pip install -e .
Running the Application
Carefree-creator is equipped with a command-line interface to establish a local service. Here’s what you can do:
-
Serve using GPU:
cfcreator serve
-
Serve using CPU, suitable for devices like some Macs:
cfcreator serve --cpu
-
Limit model loading if using GPU:
cfcreator serve --limit 1
This command loads only the currently executing model to minimize GPU RAM usage.
-
If RAM is ample but GPU RAM is constrained, try lazy loading:
cfcreator serve --lazy
This approach moves only the executing model to GPU RAM while others reside in regular RAM.
-
For specific endpoint testing, use:
cfcreator serve --focus sd.base
or
cfcreator serve --focus sd.anime
To explore further capabilities, use the help option:
cfcreator serve --help
Using Docker
To launch with Docker, first set up your environment:
export TAG_NAME=cfcreator
git clone https://github.com/carefree0910/carefree-creator.git
cd carefree-creator
Build the Docker image:
docker build -t $TAG_NAME .
For faster builds in China, use Dockerfile.cn:
docker build -t $TAG_NAME -f Dockerfile.cn .
Run the container:
docker run --gpus all --rm -p 8123:8123 $TAG_NAME:latest
Project Credits
Carefree-creator extends gratitude to foundational projects and tools, including:
- Stable Diffusion for foundational generation techniques.
- Stable Diffusion from RunwayML for SD-inpainting methods.
- Waifu Diffusion for anime-tuned enhancements of Stable Diffusion.
- Real ESRGAN for super-resolution techniques.
- Latent Diffusion for inpainting and landscape synthesis methods.
- Carefree-learn for providing the API framework and model implementations.
And a special thanks to all contributors and users—each of you plays a vital role in making this project a success.