Skip to content
This repository was archived by the owner on Mar 21, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Once you accept the terms, sign in with your Hugging Face hub READ token as belo
> If using a fine-grained token, it is also necessary to [edit permissions](https://huggingface.co/settings/tokens) to allow `Read access to contents of all public gated repos you can access`

```bash
huggingface-cli login --token YOUR_HF_HUB_TOKEN
hf auth login --token YOUR_HF_HUB_TOKEN
```

</details>
Expand Down
13 changes: 8 additions & 5 deletions python/src/diffusionkit/mlx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,14 @@ def generate_image(
logger.info(f"Peak memory: {log['peak_memory']:.1f}GB")

logger.info("============= Inference Context =============")
ic = DiffusionKitInferenceContext()
logger.info("Operating System:")
pprint(ic.os_spec())
logger.info("Device:")
pprint(ic.device_spec())
try:
ic = DiffusionKitInferenceContext()
logger.info("Operating System:")
pprint(ic.os_spec())
logger.info("Device:")
pprint(ic.device_spec())
except Exception:
pass

# unload VAE Decoder model after decoding in low memory mode
if self.low_memory_mode:
Expand Down
10 changes: 0 additions & 10 deletions python/src/diffusionkit/mlx/mmdit.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,11 +633,6 @@ def rearrange_for_sdpa(t):
multimodal_sdpa_inputs["k"], positional_encodings
)

if self.config.low_memory_mode:
multimodal_sdpa_inputs[
"memory_efficient_threshold"
] = SDPA_FLASH_ATTN_THRESHOLD

# Compute multi-modal SDPA
sdpa_outputs = (
self.sdpa(**multimodal_sdpa_inputs)
Expand Down Expand Up @@ -726,11 +721,6 @@ def rearrange_for_sdpa(t):
multimodal_sdpa_inputs["k"], positional_encodings
)

if self.config.low_memory_mode:
multimodal_sdpa_inputs[
"memory_efficient_threshold"
] = SDPA_FLASH_ATTN_THRESHOLD

# Compute multi-modal SDPA
sdpa_outputs = (
self.sdpa(**multimodal_sdpa_inputs)
Expand Down