mflux-testing
Runs mflux test suites and manages image comparisons, ensuring golden image references are only updated when requested.
Install
mkdir -p .claude/skills/mflux-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3494" && unzip -o skill.zip -d .claude/skills/mflux-testing && rm skill.zipInstalls to .claude/skills/mflux-testing
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run tests in mflux (fast/slow/full), preserve image outputs, and handle golden image diffs safely.Key capabilities
- →Execute full, fast, or slow mflux test suites
- →Validate golden image consistency
- →Manage test image artifact preservation
- →Identify regressions in CLI behavior
- →Generate test failure summaries
How it works
It wraps standard pytest execution with environment variables (like `MFLUX_PRESERVE_TEST_OUTPUT`) to ensure images are persisted for manual inspection.
Inputs & outputs
When to use mflux-testing
- →Run the full mflux test suite
- →Execute fast tests without image generation
- →Review failing image generation tests
- →Validate golden image mismatches
About this skill
mflux testing
This repo uses pytest with image-producing tests. Always preserve outputs for inspection and never update reference images unless explicitly asked.
When to Use
- You need to run tests (fast/slow/full) or debug failing tests.
- There are image/golden mismatches and you need to report paths/output for review.
Instructions
- Prefer the Makefile test targets:
make test-fast(fast tests, no image generation)make test-slow(slow tests, image generation)make test(default selection, skips slow model tests)make test-all(full suite, slow tests download model weights)
- Always keep
MFLUX_PRESERVE_TEST_OUTPUT=1on test runs (already built into the Makefile test targets). - If a change affects defaults, config resolution, metadata fields, or CLI behavior, add or update tests that cover the changed behavior directly instead of relying only on manual verification.
- If tests fail:
- Summarize the failing test names and the key assertion output.
- Point to any generated images/artifacts on disk for manual review.
- Do not regenerate/replace reference (“golden”) images unless the user explicitly requests it.
Updating golden images (new model or hardware refresh)
Golden tests compare generated PNGs to tests/resources/reference_*.png (typically 15% mismatch threshold).
When to update (only with explicit user approval):
- After validating the port on target hardware (CI Mac) via slow tests with
MFLUX_PRESERVE_TEST_OUTPUT=1 - After choosing a stable prompt/seed/settings via diffusers comparison and/or latent-injection confidence (
mflux-debugging) - When old references used a bad prompt (e.g. ambiguous subject) or wrong seed for mflux’s RNG
Workflow:
- Run slow test → inspect
tests/resources/output_*.pngvsreference_*.png - If output is correct but reference is stale, re-run generation with same test parameters and replace reference PNGs
- Commit test + reference images together with a clear message (e.g.
test(<model>): update golden images for local hardware)
Important: Golden tests lock mflux-native sampling (mx.random + mflux schedulers), not diffusers pixel parity. A good diffusers side-by-side or injected-latent run builds confidence in the model code; the golden still reflects mflux’s full recipe on CI hardware.
Manual validation (config resolution + local model paths)
Use when a change touches model config resolution, mflux-save, or the model’s generate CLI, or when a PR fixes local model-path handling for the model under investigation. Refer to the mflux-cli skill to find the correct generate command for the model you are testing.
- Run a local-path quantize/save:
- Use the
mflux-cliskill to look up the correct command and flags. - Verify CLI usage with the command’s
--helpbefore running it. - Save to a known location (e.g., Desktop) to make follow-up steps explicit.
- Use the
- Run generation from the saved model using the correct model-specific generate CLI:
- Use the
mflux-cliskill to find the generate command and required flags. - Verify CLI usage with the command’s
--helpbefore running it.
- Use the
- If the model has multiple size variants, repeat the above for each variant to confirm the correct overrides are applied.
- Do not commit output artifacts; delete or leave them untracked.
When not to use it
- →Generic project testing
- →Environment without mflux infrastructure
Prerequisites
Limitations
- →Relies on manual golden image updates
- →High disk usage due to image artifacts
- →Requires strict threshold validation
How it compares
Standardizes testing for generative image outputs with specific golden-file comparison logic.
Compared to similar skills
mflux-testing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| mflux-testing (this skill) | 1 | 2mo | No flags | Intermediate |
| vitest | 41 | 6mo | No flags | Intermediate |
| svelte-expert | 11 | 9mo | No flags | Intermediate |
| implementing-cards | 7 | 2mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by filipstrand
View all by filipstrand →You might also like
vitest
antfu
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
svelte-expert
Raudbjorn
Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.
implementing-cards
bcollazo
Fill out the implementation of effects of different attacks, abilities, and trainer cards in this Pokemon TCG Pocket engine codebase.
zod-4
prowler-cloud
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
csharp-pro
sickn33
Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.
write-unit-tests
tldraw
Writing unit and integration tests for the tldraw SDK. Use when creating new tests, adding test coverage, or fixing failing tests in packages/editor or packages/tldraw. Covers Vitest patterns, TestEditor usage, and test file organization.