fix: correct import path for load_model_dict_into_meta in conversion scripts #12616
+6
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #12606
This PR corrects the import path for
load_model_dict_into_metain 6 conversion scripts that were importing from the wrong module.Problem
The function
load_model_dict_into_metaexists indiffusers/models/model_loading_utils.pybut the conversion scripts were importing it fromdiffusers/models/modeling_utils.py(where it doesn't exist), causingImportErrorwhen running these scripts.Solution
Updated the import statement in the following conversion scripts:
scripts/convert_sd3_to_diffusers.pyscripts/convert_stable_cascade_lite.pyscripts/convert_stable_cascade.pyscripts/convert_stable_audio.pyscripts/convert_sana_to_diffusers.pyscripts/convert_sana_controlnet_to_diffusers.pyChanged from:
To:
Testing
While I discovered this issue was present in 6 scripts (not just the SD3 script mentioned in the issue), the fix is straightforward - it's simply correcting the import path to match where the function actually exists.