System Info
npm:
"@huggingface/transformers": "^3.7.2",
"onnxruntime-node": "^1.22.0-rev",
"electron": "^28.0.0",
OS: Windows 11 home edition
model: Mozilla/distilvit
Environment/Platform
Description
When the model is downloading, the progressInfo in the progress_callback method sometimes lacks the status, name, and file attributes. I found that the loss occurs in the progress status, without name and file fields, making it impossible for me to determine which specific file's download progress it is.
Reproduction
this.model = await VisionEncoderDecoderModel.from_pretrained(modelConfig.id, modelOptions);
progress_callback:
const createProgressCallback = (componentType: 'processor' | 'model') => {
return (progress: any) => {
const logMessage = `[${new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}] createProgressCallback 进度: ${componentType} ${JSON.stringify(progress)}\n`;
console.log('createProgressCallback 进度:', componentType, progress);
try {
appendFileSync(join(this.cacheDir, 'progress.log'), logMessage, 'utf8');
} catch (error) {
console.error('写入日志文件失败:', error);
}
}
};
};