Merge pull request #116 from daily-co/moondream-use-cpu
moondream: allow passing use_cpu
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user