[5.8.4] MetaHuman Creator: editor memory grows by 5–18 GB per scripted build and is never released

Summary

When MetaHumans are created and built by Python script in the editor (MetaHuman Creator in UE 5.8), the editor process grows by 5–18 GB with every build and never gives the memory back: not after closing the character for editing, not after unloading its packages, not after garbage collection. On a 32 GB machine this allows only one or two builds per editor session; after that the editor has to be restarted.

Are you affected too? Please vote for this post. Epic creates an internal ticket once a report here gets 5 votes. If you see the same behaviour, a short reply with your numbers helps to narrow it down: engine version, RAM, pipeline (Cinematic/Optimized, baked materials yes/no), texture resolution, memory before and after one build, and how many builds fit into one editor session.

What Type of Bug are you experiencing?

Editor

Steps to Reproduce

  1. Open a project with the MetaHuman plugins enabled and sign in to Epic in the editor (needed for auto-rigging and texture requests).
  2. Run a Python script (e.g. via remote execution) that does the following for each of several characters:
    • duplicate a preset (/MetaHumanCharacter/Optional/Presets/<Preset>) to /Game/<Folder>/MH_<n>
    • MetaHumanCharacterEditorSubsystem.try_add_object_to_edit(character)
    • set face coefficients (set_face_model_coefficients, commit_face_state), body constraints (set_body_constraints, commit_body_state) and skin settings (commit_skin_settings)
    • request_auto_rigging (JOINTS_ONLY, blocking=True)
    • request_texture_sources (blocking=True, default resolutions)
    • build_meta_human (Cinematic pipeline, absolute_build_path=/Game/MetaHumans)
    • remove_object_to_edit(character), then save only the character asset (not the build)
  3. Between characters: load an empty level (LevelEditorSubsystem.new_level), unload the packages of the built character (EditorLoadingAndSavingUtils.unload_packages) and call SystemLibrary.collect_garbage().
  4. Watch the private memory of UnrealEditor.exe.

Expected Result

After a build, closing the character for editing, unloading its packages and garbage collection, the editor returns to roughly its previous memory footprint.

Observed Result

  • Private memory grows with every build and is not released: 17.7 GB → 37 GB after four builds.
  • With baked materials (Cinematic pipeline, baked body textures 4096/8192), a single build leaves the editor at 20–26 GB private memory; the peak while compressing the 8192 textures is about 18 GB above the starting value.
  • Each try_add_object_to_edit creates new transient preview meshes (MetaHumanCharacterEditorSubsystem_0.BodyMesh_<n>) that stay alive. About 60 open/close cycles of one character exhausted the page file and crashed the editor.
  • Related crashes and side effects:
    • Unloading a level that contains a spawned built MetaHuman blueprint crashed the editor (“World Memory Leaks”, EditorServer.cpp, line 1951).
    • A character that was built in the current editor session cannot be deleted (EditorAssetLibrary.delete_asset fails) until the editor is restarted.

Affects Versions

5.8

Platform(s)

Windows

Additional Notes

Environment

  • Unreal Engine 5.8.4 (CL 58902052, Launcher build), MetaHumanCharacter plugin 1.0.0
  • Windows 11, 32 GB RAM, page file up to 32 GB, GeForce RTX 3070 Ti 8 GB

Workaround
Restart the editor before a build when less than about 20 GB of commit memory is free. Each restart costs 2–3 minutes, and with baked materials this is needed before almost every build. Epic’s hardware notes already say that assembly with large textures can exceed 32 GB (MetaHuman hardware requirements), so this mainly hits batch workflows.

Related, but not the same

This report is about something else: the memory is never released between builds, so it adds up from build to build.

Questions for Epic

  • Is there a supported way to release the memory of a finished build, or of the editing session of a character, without restarting the editor?
  • Can builds run in a short-lived commandlet process (e.g. -ExecutePythonScript) that uses the stored Epic sign-in, so that the memory is freed when the process ends?

If you are affected, please vote and add your numbers. Thank you!