HFI: A unified framework for training-free detection and implicit watermarking of latent diffusion model generated images