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?
This pull request adds support for a new 4-bit quantized model version (
argmaxinc/mlx-stable-diffusion-3.5-large-4bit-quantized
) across various files. The changes include updating model configurations, loading mechanisms, and script parameters to handle this new model variant.Model Configuration Updates:
python/src/diffusionkit/mlx/__init__.py
: Added entries for the 4-bit quantized model inMMDIT_CKPT
andT5_MAX_LENGTH
. [1] [2]python/src/diffusionkit/mlx/model_io.py
: Updated_MODELS
,_PREFIX
,_CONFIG
,DEPTH
, andMAX_LATENT_RESOLUTION
to include the new model. [1] [2] [3]Model Loading Adjustments:
python/src/diffusionkit/mlx/model_io.py
: Modifiedload_mmdit
,load_vae_decoder
, andload_vae_encoder
(vae related functions were modified as the checkpoint was pushed with modifications that are applied on the function) functions to handle the specific requirements of the 4-bit quantized model, including prefix adjustments and quantization handling. [1] [2] [3]