#338·moondream

错误: 缺少 Hugging Face 集成文件以及 `from_pretrained()` 支持出现问题

作者: Muhammad-Ikhwan-Fathulloh创建于 2026年6月23日更新于 2026年6月23日
  • Restore moondream/hf/util.py
  • Add detect_device() and LATEST_REVISION
  • Restore moondream/hf/moondream.py
  • Re-export HfMoondream and HfConfig
  • Register Hugging Face Auto classes
  • Restore:
  • moondream/hf/__init__.py
  • moondream/__init__.py
  • Fix HfMoondream.generate() to correctly call _generate_answer() with required parameters.
  • Implement HfMoondream.from_pretrained() using:
  • huggingface_hub.snapshot_download
  • automatic checkpoint discovery
  • load_weights_into_model
  • Restore backward compatibility for:
  • caption()

内容来源: m87-labs/moondream