Skip to content

Commit 81c650c

Browse files
Fix text cache source_path_in_name: prompt_path -> image_path
'prompt_path' doesn't exist as a pipeline name, so _get_source_path returned None for every text cache lookup, causing 100% cache misses and device mismatch errors when the text encoder was on CPU during training. Use 'image_path' as the key, matching the old DiskCache behavior.
1 parent 948935d commit 81c650c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/dataLoader/mixin/DataLoaderText2ImageMixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def before_cache_text_fun():
400400

401401
text_disk_cache = SmartDiskCache(cache_dir=text_cache_dir, split_names=text_split_names, aggregate_names=[], variations_in_name='concept.text_variations', balancing_in_name='concept.balancing', balancing_strategy_in_name='concept.balancing_strategy',
402402
variations_group_in_name=['concept.path', 'concept.seed', 'concept.include_subdirectories', 'concept.text'], group_enabled_in_name='concept.enabled', before_cache_fun=before_cache_text_fun,
403-
modeltype=config.model_type.value, source_path_in_name='prompt_path', sourceless=sourceless)
403+
modeltype=config.model_type.value, source_path_in_name='image_path', sourceless=sourceless)
404404

405405
modules = []
406406

0 commit comments

Comments
 (0)