use anyhow::Result;
use bytes::Bytes;
use vc_shared::hashing::{sha256, Sha256Digest};
use super::api::ComfyClient;
use super::types::ImageOutput;
pub async fn download_and_hash(
client: &ComfyClient,
image: &ImageOutput,
) -> Result<(Bytes, Sha256Digest)> {
let bytes = client.download_image(image).await?;
let hash = sha256(&bytes);
Ok((bytes, hash))
}