Dimjournal is a powerful Python tool designed to create and maintain a local backup of your Midjourney image generations. It automates the process of downloading your job history (metadata) and upscaled images, organizing them neatly on your computer.
![]()
Dimjournal is a command-line and programmatic tool that interacts with the Midjourney web interface to back up your creative work. It downloads:
This tool is for any Midjourney user who wants:
Year/Month/ImageFileName.png structure.Important: The terms of use of Midjourney may disallow or restrict automation or web scraping. Using this tool may be against Midjourney’s Terms of Service. You use Dimjournal at your own risk. The developers of Dimjournal are not responsible for any consequences that may arise from using this software, including but not limited to account suspension or termination.
Year/Month/ImageFileName.png).undetected_chromedriver (a dependency) relies on it.You can install Dimjournal using pip.
Stable Version (Recommended):
pip install dimjournal
Development Version (for the latest features and fixes):
pip install git+https://github.com/twardoch/dimjournal.git
After installation, you should be able to run dimjournal from your terminal. If not, ensure your Python scripts directory is in your system’s PATH, or use python3 -m dimjournal.
The first time you run Dimjournal, it will open a Chrome browser window. You will need to manually log in to your Midjourney account. After successful login, Dimjournal will save session cookies to expedite future logins.
Basic Usage (defaults to ~/Pictures/midjourney/dimjournal or ~/My Pictures/midjourney/dimjournal):
dimjournal
Specify a Custom Archive Folder:
dimjournal --archive_folder /path/to/your/custom_archive
or on Windows:
dimjournal --archive_folder C:\path\to\your\custom_archive
Limit Number of Job Pages to Crawl: Useful for initial testing or if you only want to fetch the most recent items. Each page typically contains about 50 jobs.
dimjournal --limit 5
This will crawl the 5 most recent pages of your job history for both upscaled jobs and all jobs.
You can integrate Dimjournal’s download functionality into your own Python scripts.
import logging
from pathlib import Path
from dimjournal import download
# It's good practice to configure logging to see Dimjournal's output
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
# Specify the directory where you want to store the data.
# If None, it defaults to Pictures/midjourney/dimjournal or My Pictures/midjourney/dimjournal.
archive_folder_path = Path("./my_midjourney_backup")
# archive_folder_path = None # To use the default location
# Specify a limit for the number of job history pages to crawl (optional).
# Set to None or omit to crawl all available history.
crawl_limit = 10 # Example: Crawl 10 pages of recent jobs
try:
print(f"Starting Dimjournal backup to: {archive_folder_path.resolve() if archive_folder_path else 'default location'}")
download(archive_folder=archive_folder_path, limit=crawl_limit)
print("Dimjournal process complete.")
except Exception as e:
logging.error(f"An error occurred during the Dimjournal process: {e}", exc_info=True)
print(f"An error occurred. Check logs for details.")
Dimjournal employs a series of steps to back up your Midjourney data:
undetected_chromedriver, a specialized version of Selenium’s ChromeDriver, to launch and control a Google Chrome browser. This allows it to mimic human interaction with the Midjourney website.cookies.pkl; reused on subsequent runs.<script id="__NEXT_DATA__"> on the account page; saved as user.json.https://www.midjourney.com/api/app/recent-jobs/ (two passes: upscale + all); stored in jobs_upscale.json / jobs.json.ARCHIVE/YYYY/MM/YYYYMMDD-HHMM_prompt-slug_jobIDprefix.ext; PNG metadata embedded via pymtpng.src/dimjournal/
├── dimjournal.py # Core logic: Constants, MidjourneyAPI, MidjourneyJobCrawler, MidjourneyDownloader, download()
├── __main__.py # CLI entry point (python-fire)
└── __init__.py # Package init; re-exports download()
tests/
└── test_dimjournal.py
pip install -e ".[dev]"ruff check src tests · Format: ruff format src testspytestCode style: Python 3.10+, ruff-enforced, type hints required, logging for diagnostics.
See CHANGELOG.md.
Apache 2.0 — see LICENSE.txt.
See AUTHORS.md.