Closed xalteropsx closed 1 month ago
@yingdachen bro it has an problem like if u pass pipeliine( model="iic/offlinemodel") it fail by above error cause it cant understand the path but while loading the internet it work
so the short fix is to pass full path like pipeline(model="d:\panda\sad\iic\offlinemodel")
but the issue bring back if some model wont exist and we pass the full path will be issue
@yingdachen bro it has an problem like if u pass pipeliine( model="iic/offlinemodel") it fail by above error cause it cant understand the path but while loading the internet it work
so the short fix is to pass full path like pipeline(model="d:\panda\sad\iic\offlinemodel") but the issue bring back if some model wont exist and we pass the full path will be issue
things like "iic/offlinemodel" is the modelscope model id, which instruct the code to query remote hub for latest version of the model (it will use local cache if there is no newer version on the hub). therefore, use you should make sure a local copy exists and use full local model path if you want to skip any remote round trip.
but i mention above if i use full local model path // assume what if i want to download unknown model just by passing name also want to get offline existing model if network disable so just a way to bypass latest version check and get full path of model since u already able to track model directory even passing icc/offlinemodel why need to pass full path thats an issue
cannot u just add a dictonary and offline support so it will check first offline model before checking latest version from hub if their is a no network connection
nvm bro seems like u dont understand the problem @yingdachen actually u should disable remote hub for latest version of model
if their is no network on user or if he working offline / a way skip version check if no network and check if directory exist or not
rather passing whole directory that what i saying but i closing this seems like no one have interest i will manually create dictonary for it
you can always specify "local_files_only=True" :)
thanks that will work as well
File "Z:\software\python11\Lib\site-packages\modelscope\pipelines\builder.py", line 118, in pipeline model = normalize_model_input( ^^^^^^^^^^^^^^^^^^^^^^ File "Z:\software\python11\Lib\site-packages\modelscope\pipelines\builder.py", line 29, in normalize_model_input if isinstance(model, str) and is_official_hub_path(model, model_revision): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Z:\software\python11\Lib\site-packages\modelscope\pipelines\util.py", line 41, in is_official_hub_path return is_official_hub_impl(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Z:\software\python11\Lib\site-packages\modelscope\pipelines\util.py", line 38, in is_official_hub_impl raise ValueError(f'invalid model repo path {e}') ValueError: invalid model repo path HTTPSConnectionPool(host='www.modelscope.cn', port=443): Max retries exceeded with url: /api/v1/models/iic/cv_unet_skin_retouching_torch (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001F8511D1D90>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
cannot able to work offline