Skip to content
Notifications
Clear all

Just built a dashboard to track our monthly credit spend across projects.

1 Posts
1 Users
0 Reactions
0 Views
(@amandaj)
Reputable Member
Joined: 3 weeks ago
Posts: 284
Topic starter   [#24501]

Over the past quarter, our creative team's usage of Midjourney has scaled significantly, leading to a concerning lack of visibility into how our subscription credits are being allocated across various initiatives. Without a centralized tracking mechanism, we were operating on anecdotal evidence and monthly invoice surprises, which is antithetical to a data-driven operational model. To address this, I have developed an internal dashboard that aggregates credit consumption by project, user, and job type, providing a granular view of our generative AI expenditure.

The system works by programmatically fetching data from two primary sources: the Midjourney Discord channel logs and our internal project management tool via their respective APIs. The key was to correlate Discord user IDs with our internal team members and tag generated images with project codes submitted in the job prompts. The core transformation logic, written in Python, extracts the credit usage from the "relaxed" or "fast" mode indicators in the logs and normalizes them into a standard credit unit.

Here is a simplified version of the key data extraction function:

```python
import re
import pandas as pd

def parse_midjourney_log(message_content, user_id):
"""
Parses a single Discord message to extract credit-relevant data.
"""
credit_data = {
'user_id': user_id,
'mode': None,
'steps': None,
'credits_used': 0
}

# Identify job mode
if '--relax' in message_content:
credit_data['mode'] = 'relaxed'
# Relaxed mode cost logic (e.g., variable, but tracked per minute)
credit_data['credits_used'] = estimate_relaxed_credits(message_content)
else:
credit_data['mode'] = 'fast'
# Fast mode: determine cost based on upscaling and variations
if 'Upscaled by' in message_content:
credit_data['credits_used'] = 0.2 # Example: Light Upscale cost
else:
credit_data['credits_used'] = 0.1 # Example: standard fast generation

# Extract project tag from prompt (e.g., '[PROJ:WebsiteRedesign]')
project_tag_match = re.search(r'[PROJ:(w+)]', message_content)
if project_tag_match:
credit_data['project_code'] = project_tag_match.group(1)

return credit_data
```

The dashboard itself is built in Metabase and presents several critical views:
* **Monthly Credit Burn Rate:** A time-series chart comparing planned vs. actual credit usage.
* **Credit Allocation by Project:** A bar chart ranking projects by total credit consumption, highlighting potential scope creep or over-reliance on concept generation in certain areas.
* **User-Level Efficiency:** A table showing credits used per user alongside output metrics (number of final assets selected), fostering accountability.
* **Job-Type Analysis:** A breakdown of credit spend between initial generations, variations, upscales, and inpainting, which helps optimize prompt engineering practices.

Initial findings from the first month of data have already revealed significant insights. For instance, approximately 40% of our fast credits were consumed by a single project in the exploratory phase, which was not budgeted for. Furthermore, we identified that using 'relaxed' mode for high-volume, low-urgency batch jobs could yield a 22% credit saving compared to our default 'fast' mode usage.

I am interested in hearing how other organizations are tackling this resource governance challenge. Specifically:
* Have you implemented similar tracking, and if so, what metrics do you find most actionable?
* Are there established methodologies for allocating a generative AI credit budget to projects or teams?
* What pitfalls should one avoid when attributing credit costs from shared Discord channels?

— Amanda


Data > opinions


   
Quote