trying to copy space\run localy and getting this RuntimeError: expected scalar type Float but found Half

#445
by TheLastHisoka - opened

File "C:\Users\Hisoka\CLIP-Interrogator\app.py", line 154, in
ex = gr.Examples(
File "C:\Users\Hisoka\CLIP-Interrogator\gradio\helpers.py", line 69, in create_examples
utils.synchronize_async(examples_obj.create)
File "C:\Users\Hisoka\CLIP-Interrogator\gradio\utils.py", line 377, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs)
File "C:\Users\Hisoka\AppData\Local\Programs\Python\Python310\Lib\site-packages\fsspec\asyn.py", line 99, in sync
raise return_result
File "C:\Users\Hisoka\AppData\Local\Programs\Python\Python310\Lib\site-packages\fsspec\asyn.py", line 54, in _runner
result[0] = await coro
File "C:\Users\Hisoka\CLIP-Interrogator\gradio\helpers.py", line 273, in create
await self.cache()
File "C:\Users\Hisoka\CLIP-Interrogator\gradio\helpers.py", line 308, in cache
prediction = await Context.root_block.process_api(
File "C:\Users\Hisoka\CLIP-Interrogator\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "C:\Users\Hisoka\CLIP-Interrogator\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\Hisoka\AppData\Local\Programs\Python\Python310\Lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\Users\Hisoka\AppData\Local\Programs\Python\Python310\Lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\Users\Hisoka\AppData\Local\Programs\Python\Python310\Lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\Users\Hisoka\CLIP-Interrogator\app.py", line 59, in inference
prompt = ci.interrogate(image)
File "C:\Users\Hisoka\CLIP-Interrogator\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 205, in interrogate
check_multi_batch([best_medium, best_artist, best_trending, best_movement])
File "C:\Users\Hisoka\CLIP-Interrogator\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 202, in check_multi_batch
best_prompt = t.rank(image_features, 1)[0]
File "C:\Users\Hisoka\CLIP-Interrogator\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 295, in rank
tops = self._rank(image_features, self.embeds, top_count=top_count)
File "C:\Users\Hisoka\CLIP-Interrogator\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 289, in _rank
similarity = image_features @ text_embeds.T
RuntimeError: expected scalar type Float but found Half

Sign up or log in to comment