Skip to content
Open
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
3 changes: 2 additions & 1 deletion olive/passes/diffusers/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,8 @@ def _prepare_class_images(
output_dir = Path(class_data_dir)
else:
cache = OliveCache.from_cache_env()
prompt_hash = hashlib.md5(class_prompt.encode()).hexdigest()[:8]
# Used solely for creating unique directory names in cache, not a security-sensitive usage.
prompt_hash = hashlib.md5(class_prompt.encode()).hexdigest()[:8] # CodeQL [SM02167] Justification above
output_dir = cache.get_cache_dir() / "class_images" / prompt_hash

output_dir.mkdir(parents=True, exist_ok=True)
Expand Down
Loading