While going through the steps listed in the description, the "Converting Models from PyTorch to Core ML" section fails on the Step 2, i.e., when I type:
python -m tests.torch2coreml.test_mmdit --sd3-ckpt-path ../sd3_medium_incl_clips.safetensors --model-version '8b' -o .../generatedResponsesWithStableDiffusion3Medium --latent-size 128
I get the following error:
======================================================================
ERROR: setUpClass (__main__.TestSD3MMDiT)
----------------------------------------------------------------------
Traceback (most recent call last):
File ".../DiffusionKit-main/tests/torch2coreml/test_mmdit.py", line 69, in setUpClass
_load_mmdit_weights(cls.test_torch_model, TEST_SD3_CKPT_PATH)
File ".../DiffusionKit-main/python/src/torch/model_io.py", line 83, in _load_mmdit_weights
raise ValueError(
ValueError: Total number of parameters in state_dict (2084877376) does not match the number of parameters in the module (8146086208)
----------------------------------------------------------------------
Ran 0 tests in 24.105s
FAILED (errors=1)
I see that there is a discrepancy in the number of module parameters, but the file I downloaded from HuggingFace is "sd3_medium_incl_clips.safetensors".
I'm using macOS Sonoma 14.3.1, Python 3.9.19
Are there any workarounds and suggestions for the issue? Thank you in advance.
While going through the steps listed in the description, the "Converting Models from PyTorch to Core ML" section fails on the Step 2, i.e., when I type:
I get the following error:
I see that there is a discrepancy in the number of module parameters, but the file I downloaded from HuggingFace is "sd3_medium_incl_clips.safetensors".
I'm using macOS Sonoma 14.3.1, Python 3.9.19
Are there any workarounds and suggestions for the issue? Thank you in advance.