Repository navigation
Image Preparer Auto Crop
Auto crop crops your pictures to something you describe, such as face, dog or red car. An AI model,
SAM 3.1 (Meta's Segment Anything 3.1), finds it in each picture. The crop is then worked out exactly like the
RulZ Mask Intelligent Crop ComfyUI
node, with all of its settings. Added in version 0.2.0.
-
Pick the pictures. Ctrl+click or Shift+click pictures on the main screen to select them. With none selected, every picture is used.
-
Click Auto crop… in the top bar, or right-click a picture and choose Auto crop. The first time, the app offers a one-time setup (see below).
-
Type what to crop in the box at the top.
-
Click Preview (or press Enter). Each selected picture is checked, starting with the one on screen:
- the part that was found is tinted red
- the crop is a dashed box, with everything outside it darkened
- the line at the bottom shows how many matches there were, how sure the AI was, and the crop size
Click the small pictures in the strip below to check each one. The first Preview after opening the app takes up to half a minute while the AI loads; after that it's well under a second per picture.
-
Adjust the crop settings. The dashed box moves straight away. If you change the words or the Finding it settings, click Preview again.
-
Click Crop…, pick a folder, and every picture is cropped and saved there with the same file name. Your originals are never changed. Pictures where nothing was found are skipped and listed when it's done.
Tick Also remove noise and JPEG damage first to apply your clean-up settings (color noise removal, JPEG artifact removal and detail recovery) before cropping. Each picture uses its own settings, the same as Save all…, including Best quality (AI) if that's selected. See Clean-up Options for what each one does.
| Setting | What it does |
|---|---|
| Matches | All matches: the crop covers every match (for example every face in a group photo). Best match only: just the one the AI is most sure about. |
| Confidence | How sure the AI must be that something matches (default 0.50). Lower finds more, including wrong things; higher finds less. |
| Mask threshold | How sure the AI must be about each pixel for it to count as part of the match (default 0.50). Lower makes the found area bigger, higher makes it tighter. |
| Setting | What it does |
|---|---|
| Padding | Same on every side: one value for all sides. Each side separately: separate values for top, bottom, left and right. |
| All sides / Top, Bottom, Left, Right | How much room to leave around what was found, as a percentage (default 10%). |
| Measured against | What the percentage is of. The final crop (default): what was found sits inside a border that's that share of the output. The found area: a share of the found area's size. The whole picture: a share of the picture's size. |
| Shape limit | Never crop narrower or wider than this shape (default 2:3 / 3:2). A crop that would be too tall is made wider; one that would be too wide is made taller. It only ever grows, and stays inside the picture. Off turns it off. |
| Divisible by | Grows the crop so its width and height are multiples of this number, for example 8, 16 or 64 for training. 1 turns it off. |
Everything on this screen is remembered for next time.
The first time you click Auto crop…, a window called Set up Auto crop lists what's missing:
| What | Size | Where it goes |
|---|---|---|
| PyTorch with NVIDIA GPU support (shared with Best quality mode, so skipped if that's already set up) | about 3 GB to download | The app's own .venv folder |
| Transformers and TorchVision, which run SAM 3.1 | about 100 MB | The app's own .venv folder |
| The SAM 3.1 model from huggingface.co/unsloth/sam3.1 | 1.7 GB | %LOCALAPPDATA%\RulZ\Image Preparer\models\sam3.1 |
Click Set up. No Hugging Face account or sign-in is needed. When the download is done, the app checks the model file's size and checksum, so a broken download is never used. If something fails, click Try again; it only does the parts that are still missing. See Troubleshooting.
Auto crop works best on an NVIDIA graphics card (GeForce 20-series or newer) and uses about 2 GB of its memory. Without one it still works, but much more slowly.
SAM 3.1 is by Meta under the SAM License, which comes with the model download.
RulZ AI Tools Suite
The apps
RulzTrainer
Rulz Training Captioner
Getting started
Using the app
Models and GPUs
Reference
RulZ LLM Suite
Using the app
Reference
Contributing
RulZ Coding Agent
Using the app
- Getting Started
- Projects and Tasks
- Approvals and Safety
- Model Settings
- Run and Share
- Notes and Instructions
- Extra Tools (MCP)
- Phone Access
Reference
Contributing
RulZ Image Organizer
Using RulZ
- Getting Started
- Library and Scanning
- People and Corrections
- Search and Filters
- Photo Viewer
- Appearance
More
RulZ Image Tournament
Using the app
- Getting Started
- How the Tournament Works
- Comparing Images
- Controls and Shortcuts
- Options and Settings
- Supported Formats
- Troubleshooting and FAQ
Developers
RulZ Image Crawler
Getting started
Using the app
Help
RulZ Image Preparer
Getting started
Using the app
Reference
RulZ Image Grid
Using the app
Help
RulZ Simple Video Clip Extractor
Getting started
User guide
- Playback and Marks
- Fixed-Length Clips
- Exporting
- Crop, Rotate and Flip
- Colour Matching
- Preferences and Themes
Help