Merge pull request #116 from daily-co/moondream-use-cpu

moondream: allow passing use_cpu
This commit is contained in:
Aleix Conchillo Flaqué
2024-04-11 09:08:11 +08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ async def main(room_url: str, token):
vision_aggregator = VisionImageFrameAggregator()
# If you run into weird description, try with use_cpu=True
moondream = MoondreamService()
tts = ElevenLabsTTSService(

View File

@@ -25,11 +25,11 @@ class MoondreamService(VisionService):
self,
model_id="vikhyatk/moondream2",
revision="2024-04-02",
device=None
use_cpu=False
):
super().__init__()
if not device:
if not use_cpu:
device, dtype = detect_device()
else:
device = torch.device("cpu")