Missing validation of generated image before saving in prompt_to_card_pipeline.py #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
In
prompt_to_card_pipeline.pylines 230-242, the image generation result is used without sufficient validation:Problems
result.images[0]could raiseIndexErrorif images is an empty-like object that passes the truthiness checkimageis actually a PIL Image before calling.save().save()failures (disk full, permission denied, invalid path)Fix
Add explicit type check and wrap save in try/except: