DEV Community

张洲诚(Zack.ZHANG)
张洲诚(Zack.ZHANG)

Posted on • Originally published at github.com

The AI Image Toolkit: One CLI for Background Removal, Portraits, Manga, and 3D

AI image editing tools are everywhere, but each does only one thing. Remove.bg does cutouts. Miaoya does portraits. Midjourney does generation. To chain 5 needs, you switch between 5 platforms.

Bailian CLI packs 28+ image capabilities into one CLI. Here are 10 tested scenarios.

Installation

npm install -g bailian-cli
bl config set api_key YOUR_KEY
Enter fullscreen mode Exit fullscreen mode

Get your key from the Model Studio console — free credits for new accounts.

6 Core Scenarios

1. Background Removal

bl image edit --input photo.jpg --prompt "Automatically detect the person and remove the background, preserving edge details including hair strands"
Enter fullscreen mode Exit fullscreen mode

Background removal before/after

2. AI Object Removal

bl image edit --input cat.jpg --prompt "Remove the sofa and clutter in the background, replace with clean Japanese-style minimalist living room, keep only the orange cat"
Enter fullscreen mode Exit fullscreen mode

AI object removal before/after

3. Style Transfer

bl image edit --input street.jpg --prompt "Convert this real city street photo into Japanese anime style, Studio Ghibli style, bright blue sky and fluffy white clouds"
Enter fullscreen mode Exit fullscreen mode

Style transfer before/after

4. AI Portrait

bl image generate --prompt "Generate 5 vintage film photography shots, visible film grain, authentic lighting, retro tones, Fujifilm filter"
Enter fullscreen mode Exit fullscreen mode

AI portrait generation result

5. Manga Generation

bl image generate --prompt "Generate a 4-panel manga about a cat programmer's day, cute healing style"
Enter fullscreen mode Exit fullscreen mode

Manga generation result

6. 3D Figure

bl image generate --prompt "Generate Pikachu 3D figure, ABS or PVC or resin material, high detail, smooth surface"
Enter fullscreen mode Exit fullscreen mode

3D figure generation result

Advanced

Case Command Description
Single-Image LoRA bl image edit Character consistency generation
AI Headshot bl image edit T-shirt to business suit
9-Grid Comic bl image generate Photo to comic strip
Time Machine bl image edit B&W to color

Batch Processing

for file in photos/*.jpg; do
  bl image edit --input "$file" --prompt "Remove background" --output "output/cutout_$(basename $file)"
done
Enter fullscreen mode Exit fullscreen mode

Cost

Operation CLI Traditional
Background removal $0.07/image Photoshop 30 min
AI portrait $0.07/image $1.40/shot
Manga $0.07/image $70-300/strip
3D figure $0.07/image $70-300/figure

Limitations

  1. Requires CLI basics 2. Text rendering errors 3. Details may mutate 4. 3D is render, not model file

Install | Free API Key

Top comments (0)