Add match_target_res for Qwen Image 2.1 so reference images are scaled to the target's pixel area with their own aspect ratio, consistently across text-embedding caching, training, and sampling, and key the embedding cache on it.

This commit is contained in:
Jaret Burkett committed 2026-09-22 13:57:49 -06:00
1 parent 71bc877833
commit 07abdbedc7
8 files changed
+113 -35

No files matched your search

@@ -91,6 +91,8 @@ class FileItemDTO(
self.te_padding_side = kwargs.get("te_padding_side", "right")
self.latent_space_version = kwargs.get("latent_space_version", "sd1")
self.text_embedding_space_version = kwargs.get("text_embedding_space_version", "sd1")
# model sizes references against the item's bucket, so the cache key must carry it
self.text_embedding_uses_target_size = kwargs.get("text_embedding_uses_target_size", False)
if dataset_root is not None:
# remove dataset root from path
file_key = self.path.replace(dataset_root, "")