Skip to content

Commit a3c108c

Browse files
committed
Use proper constants
1 parent b329c27 commit a3c108c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

python/src/diffusionkit/mlx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def encode_text(
655655
text,
656656
(negative_text if cfg_weight > 1 else None),
657657
)
658-
padded_tokens_t5 = mx.zeros((1, 256)).astype(tokens_t5.dtype)
658+
padded_tokens_t5 = mx.zeros((1, T5_MAX_LENGTH[self.model_version])).astype(tokens_t5.dtype)
659659
padded_tokens_t5[:, : tokens_t5.shape[1]] = tokens_t5[
660660
[0], :
661661
] # Ignore negative text

python/src/diffusionkit/mlx/scripts/generate_images.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@
1717
"sd3-8b-unreleased": 1024,
1818
"argmaxinc/mlx-FLUX.1-schnell": 512,
1919
"argmaxinc/mlx-FLUX.1-schnell-4bit-quantized": 512,
20+
"argmaxinc/mlx-FLUX.1-dev": 512,
2021
}
2122
WIDTH = {
2223
"argmaxinc/mlx-stable-diffusion-3-medium": 512,
2324
"sd3-8b-unreleased": 1024,
2425
"argmaxinc/mlx-FLUX.1-schnell": 512,
2526
"argmaxinc/mlx-FLUX.1-schnell-4bit-quantized": 512,
27+
"argmaxinc/mlx-FLUX.1-dev": 512,
2628
}
2729
SHIFT = {
2830
"argmaxinc/mlx-stable-diffusion-3-medium": 3.0,
2931
"sd3-8b-unreleased": 3.0,
3032
"argmaxinc/mlx-FLUX.1-schnell": 1.0,
3133
"argmaxinc/mlx-FLUX.1-schnell-4bit-quantized": 1.0,
34+
"argmaxinc/mlx-FLUX.1-dev": 1.0,
3235
}
3336

3437

0 commit comments

Comments
 (0)