Comments (6)
Hi, @prabin333
you should download ViT-B SAM model to ./checkpoints
,
or change this line to the path of ViT-B SAM model.
Line 8 in ce786ba
from osprey.
I'm currently using Google Colab. Could you please guide me on where to put the checkpoints folder and other required folders? I have already downloaded the Vit-B, SAM, and CLIP models, and placed them inside the checkpoints folder.
2024-01-18 05:23:43.070875: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-01-18 05:23:43.070933: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-01-18 05:23:43.073035: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-01-18 05:23:44.112812: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
File "/content/Osprey/demo/app.py", line 19, in
osprey_ = Osprey(model_path=args.model)
File "/content/Osprey/demo/osprey_inference.py", line 43, in init
self.model = OspreyLlamaForCausalLM.from_pretrained(
File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py", line 3462, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/usr/local/lib/python3.10/dist-packages/osprey/model/language_model/osprey_llama.py", line 45, in init
self.model = OspreyLlamaModel(config)
File "/usr/local/lib/python3.10/dist-packages/osprey/model/language_model/osprey_llama.py", line 37, in init
super(OspreyLlamaModel, self).init(config)
File "/usr/local/lib/python3.10/dist-packages/osprey/model/osprey_arch.py", line 31, in init
self.vision_tower = build_vision_tower(config, delay_load=False)
File "/usr/local/lib/python3.10/dist-packages/osprey/model/multimodal_encoder/builder.py", line 7, in build_vision_tower
return CLIPVisionTower(args=vision_tower_cfg)
File "/usr/local/lib/python3.10/dist-packages/osprey/model/multimodal_encoder/clip_encoder.py", line 20, in init
self.load_model()
File "/usr/local/lib/python3.10/dist-packages/osprey/model/multimodal_encoder/clip_encoder.py", line 29, in load_model
self.vision_tower.load_state_dict(torch.load(self.clip_model),strict=False)
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 791, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 271, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 252, in init
super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'open_clip_pytorch_model.bin'
from osprey.
It appears that the path to the CLIP model is incorrect. Based on the error message and the location of your checkpoints, please update this line in the config.json file of Osprey-7b model to reflect the correct path for the CLIP model, i.e., ./checkpoints/open_clip_pytorch_model.bin
.
from osprey.
After modifying the path for the models as per your instructions, a new error is occurring. Could you provide a solution to solve the specific error message?
Downloading shards: 100% 2/2 [06:42<00:00, 201.50s/it]
Loading checkpoint shards: 100% 2/2 [00:12<00:00, 6.06s/it]
Some weights of the model checkpoint at sunshine-lwt/Osprey-7b were not used when initializing OspreyLlamaForCausalLM: ['model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.25.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.24.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.14.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.1.blocks.1.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.15.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.20.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.5.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.1.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.19.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.23.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.26.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.9.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.0.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.13.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.3.blocks.0.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.4.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.3.blocks.2.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.18.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.0.blocks.1.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.10.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.22.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.3.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.16.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.11.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.7.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.6.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.3.blocks.1.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.8.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.0.blocks.0.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.21.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.17.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.1.blocks.0.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.2.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.0.blocks.2.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.12.weight', 'model.vision_tower.vision_tower.visual.trunk.stages.1.blocks.2.weight']
- This IS expected if you are initializing OspreyLlamaForCausalLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing OspreyLlamaForCausalLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of OspreyLlamaForCausalLM were not initialized from the model checkpoint at sunshine-lwt/Osprey-7b and are newly initialized: ['model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.9.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.23.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.20.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.1.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.15.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.1.blocks.1.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.21.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.12.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.6.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.24.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.0.blocks.1.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.5.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.22.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.16.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.18.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.19.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.8.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.11.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.13.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.1.blocks.2.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.25.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.0.blocks.0.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.3.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.17.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.14.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.3.blocks.2.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.1.blocks.0.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.3.blocks.0.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.10.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.4.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.2.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.7.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.26.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.0.blocks.2.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.3.blocks.1.gamma', 'model.vision_tower.vision_tower.visual.trunk.stages.2.blocks.0.gamma']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
generation_config.json: 100% 162/162 [00:00<00:00, 857kB/s]
/usr/local/lib/python3.10/dist-packages/transformers/generation/configuration_utils.py:389: UserWarning:do_sample
is set toFalse
. However,temperature
is set to0.9
-- this flag is only used in sample-based generation modes. You should setdo_sample=True
or unsettemperature
. This was detected when initializing the generation config instance, which means the corresponding file may hold incorrect parameterization and should be fixed.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/transformers/generation/configuration_utils.py:394: UserWarning:do_sample
is set toFalse
. However,top_p
is set to0.6
-- this flag is only used in sample-based generation modes. You should setdo_sample=True
or unsettop_p
. This was detected when initializing the generation config instance, which means the corresponding file may hold incorrect parameterization and should be fixed.
warnings.warn(
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/content/gradio-osprey-demo/gradio/routes.py", line 271, in main
return templates.TemplateResponse(
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 223, in TemplateResponse
template = self.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 137, in get_template
return self.env.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1010, in get_template
return self._load_template(name, globals)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 969, in _load_template
template = self.loader.load(self, name, self.make_globals(globals))
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 125, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 204, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: frontend/index.html
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 762, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 782, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 72, in app
response = await func(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 299, in app
raise e
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 294, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 40, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/content/gradio-osprey-demo/gradio/routes.py", line 282, in main
raise ValueError(
ValueError: Did you install Gradio from source files? You need to build the frontend by running /scripts/build_frontend.sh
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/content/gradio-osprey-demo/gradio/routes.py", line 271, in main
return templates.TemplateResponse(
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 223, in TemplateResponse
template = self.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 137, in get_template
return self.env.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1010, in get_template
return self._load_template(name, globals)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 969, in _load_template
template = self.loader.load(self, name, self.make_globals(globals))
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 125, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 204, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: frontend/index.html
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 762, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 782, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 72, in app
response = await func(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 299, in app
raise e
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 294, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 40, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/content/gradio-osprey-demo/gradio/routes.py", line 282, in main
raise ValueError(
ValueError: Did you install Gradio from source files? You need to build the frontend by running /scripts/build_frontend.sh
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/content/gradio-osprey-demo/gradio/routes.py", line 271, in main
return templates.TemplateResponse(
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 223, in TemplateResponse
template = self.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 137, in get_template
return self.env.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1010, in get_template
return self._load_template(name, globals)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 969, in _load_template
template = self.loader.load(self, name, self.make_globals(globals))
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 125, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 204, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: frontend/index.html
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 762, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 782, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 72, in app
response = await func(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 299, in app
raise e
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 294, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 40, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/content/gradio-osprey-demo/gradio/routes.py", line 282, in main
raise ValueError(
ValueError: Did you install Gradio from source files? You need to build the frontend by running /scripts/build_frontend.sh
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/content/gradio-osprey-demo/gradio/routes.py", line 271, in main
return templates.TemplateResponse(
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 223, in TemplateResponse
template = self.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 137, in get_template
return self.env.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1010, in get_template
return self._load_template(name, globals)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 969, in _load_template
template = self.loader.load(self, name, self.make_globals(globals))
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 125, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 204, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: frontend/index.html
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 762, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 782, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 72, in app
response = await func(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 299, in app
raise e
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 294, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 40, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/content/gradio-osprey-demo/gradio/routes.py", line 282, in main
raise ValueError(
ValueError: Did you install Gradio from source files? You need to build the frontend by running /scripts/build_frontend.sh
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/content/gradio-osprey-demo/gradio/routes.py", line 271, in main
return templates.TemplateResponse(
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 223, in TemplateResponse
template = self.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/starlette/templating.py", line 137, in get_template
return self.env.get_template(name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 1010, in get_template
return self._load_template(name, globals)
File "/usr/local/lib/python3.10/dist-packages/jinja2/environment.py", line 969, in _load_template
template = self.loader.load(self, name, self.make_globals(globals))
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 125, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/local/lib/python3.10/dist-packages/jinja2/loaders.py", line 204, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: frontend/index.html
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 762, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 782, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 72, in app
response = await func(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 299, in app
raise e
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 294, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 40, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/content/gradio-osprey-demo/gradio/routes.py", line 282, in main
raise ValueError(
ValueError: Did you install Gradio from source files? You need to build the frontend by running /scripts/build_frontend.sh
Traceback (most recent call last):
File "/content/Osprey/demo/app.py", line 501, in
demo.queue(concurrency_count=1).launch(debug=True, server_port=8002)
File "/content/gradio-osprey-demo/gradio/blocks.py", line 1899, in launch
raise ValueError(
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
from osprey.
In colab, localhost is not accessible, you can set os.environ["no_proxy"] = "localhost,127.0.0.1,::1”
in colab. I tried it and it works.
from osprey.
import os
os.environ["no_proxy"] = "localhost,127.0.0.1,::1"
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/httpx/_urlparse.py", line 339, in normalize_port
port_as_int = int(port)
ValueError: invalid literal for int() with base 10: ':1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/content/Osprey/demo/app.py", line 5, in
import gradio as gr
File "/content/gradio-osprey-demo/gradio/init.py", line 3, in
import gradio.components as components
File "/content/gradio-osprey-demo/gradio/components/init.py", line 1, in
from gradio.components.annotated_image import AnnotatedImage
File "/content/gradio-osprey-demo/gradio/components/annotated_image.py", line 12, in
from gradio import utils
File "/content/gradio-osprey-demo/gradio/utils.py", line 346, in
class AsyncRequest:
File "/content/gradio-osprey-demo/gradio/utils.py", line 365, in AsyncRequest
client = httpx.AsyncClient()
File "/usr/local/lib/python3.10/dist-packages/httpx/_client.py", line 1408, in init
self._mounts: typing.Dict[URLPattern, typing.Optional[AsyncBaseTransport]] = {
File "/usr/local/lib/python3.10/dist-packages/httpx/_client.py", line 1409, in
URLPattern(key): None
File "/usr/local/lib/python3.10/dist-packages/httpx/_utils.py", line 397, in init
url = URL(pattern)
File "/usr/local/lib/python3.10/dist-packages/httpx/_urls.py", line 113, in init
self._uri_reference = urlparse(url, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/httpx/_urlparse.py", line 246, in urlparse
parsed_port: typing.Optional[int] = normalize_port(port, scheme)
File "/usr/local/lib/python3.10/dist-packages/httpx/_urlparse.py", line 341, in normalize_port
raise InvalidURL("Invalid port")
httpx.InvalidURL: Invalid port
from osprey.
Related Issues (20)
- About the LoRA implement in the code. HOT 5
- can not access your dataset HOT 2
- How to use Osprey in my own dataset HOT 2
- online demo is not work HOT 2
- 关于模型训练 HOT 1
- 如何使用HQ-SAM自动化生产mask数据 HOT 4
- 关于token数量的问题 HOT 2
- about the training log HOT 1
- How to finetune Osprey on RefCOCOg? HOT 1
- 训练过程中使用到的数据集 HOT 1
- How to use Osprey-Chat to generate a short description for all masks of an image? HOT 1
- Expecting value: line 1 column 1 (char 0) HOT 2
- Inference Scripts HOT 1
- Web Demo Error HOT 1
- Convert to hf format HOT 1
- Output mask features. HOT 4
- Runtime error when running pope evaluation HOT 2
- environment is complex
- Support for Zero3 or Zero3 Offload? Error when loading model state_dict HOT 1
- tokenizer.json is empty after stage3 training HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osprey.