Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Fix] Prevent nested cache creation when using --save and --cache#2890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jikbb2 wants to merge4 commits intoalicevision:develop
base:develop
Choose a base branch
Loading
fromjikbb2:patch-1

Conversation

@jikbb2
Copy link

@jikbb2jikbb2 commentedSep 16, 2025
edited
Loading

Description

This PR fixes a critical bug where runningmeshroom_batch with both--save and--cache arguments simultaneously creates a nested cache directory (e.g.,test_cache/test_cache).

This incorrect structure is not just a cosmetic issue; it breaks the pipeline execution. Subsequent nodes fail to locate their input files from previously completed nodes because they search in the expected (non-nested) path instead of the actual nested one. This causes a failure to reference intermediate results and halts the computation.

Features list

Implementation remarks

The root cause was a redundantgraph.save() call at the beginning ofexecuteGraph() inmeshroom/core/graph.py. This call used the default argumentsetupProjectFile=True, which incorrectly re-triggered the project's automatic cache setup logic, conflicting with the user-provided--cache argument.

The implemented solution is a minimal, targeted change: the problematic call is modified tograph.save(setupProjectFile=False).

This preserves the intended functionality of saving the graph's progress during computation while disabling the specific logic that caused the path conflict. This ensures the user-provided cache path is respected as the single source of truth.

To test this fix:

Follow the "Steps to Reproduce" from issue #ISSUENUMBER.

Run the command:meshroom_batch -p photogrammetry -i ./images --save test.mg --cache test_cache.

Verify that a single, non-nestedtest_cache directory is created and the pipeline completes successfully without errors.

jikbb2and others added2 commitsSeptember 16, 2025 10:44
When running `meshroom_batch` with both `--save` and `--cache` arguments simultaneously, a nested cache directory is created. This prevents subsequent nodes from finding their inputs, causing the pipeline to fail.The root cause is a redundant `graph.save()` call in `executeGraph()` that defaults to `setupProjectFile=True`. This re-triggers an automatic cache setup logic which conflicts with the explicit `--cache` path.This commit fixes the issue by changing the call to `graph.save(setupProjectFile=False)`. This disables the redundant and problematic setup logic while preserving the intended functionality of saving the graph's progress during computation.Issue Numberalicevision#2889
@fabiencastan
Copy link
Member

fabiencastan commentedSep 16, 2025
edited
Loading

@jikbb2 Thanks for the PR!
What do you think about completely removing the --cache option?
As the "--save" already defines where all the data will be stored.
And when we will reopen the project.mg file, Meshroom will look into the relative MeshroomCache folder.

Or do you have a need in your use cases to put the cache and the project file in different places?

@fabiencastan
Copy link
Member

I've checked the cache is not stored in the project. So when you will reload the computed Meshroom scene, it will not find the MeshroomCache.
So I think, we should remove the --cache option.
@jikbb2 : Could you update your PR with that?

jikbb2 reacted with thumbs up emoji

@jikbb2
Copy link
Author

Hi@fabiencastan ,

Thanks for your feedback. I'd like to clarify the implementation to make sure I get it right.

Which of these two options do you prefer?

Disallow simultaneous use: Add a check to prevent using--save and--cache together, but still allow--cache to be used by itself.

Completely remove: Remove the--cache argument entirely frommeshroom_batch, as you suggested.

Additionally, should this PR also cover updating the command's help text and any other user-facing descriptions to reflect the change?

@fabiencastan
Copy link
Member

Hi@jikbb2 ,
Sorry for the delay to answer.
I think, the second option would be better. We can fully remove the --cache option and update the command line help accordingly.

jikbb2 reacted with thumbs up emoji

This merges the 'fix/nested-cache' branch, which contains the complete removal of the --cache option, into 'patch-1' to update the open pull request.
@jikbb2
Copy link
Author

I've updated the PR according to your feedback. The --cache option has been completely removed from meshroom_batch as requested.

Thanks again for the guidance!@fabiencastan

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[bug] Nested cache directory created when using meshroom_batch with --save and --cache simultaneously

2 participants

@jikbb2@fabiencastan

[8]ページ先頭

©2009-2025 Movatter.jp