AnyText icon indicating copy to clipboard operation
AnyText copied to clipboard

anytext_v1.1.ckpt integrity check failed

Open brianyuastri opened this issue 2 years ago • 8 comments

I tried installing AnyText according to the instructions, but it failed at the checkpoint downloading step. The error message is copied as follows. How do I fix this?

python demo.py 2024-01-03 14:58:58,887 - modelscope - INFO - PyTorch version 2.0.1 Found. 2024-01-03 14:58:58,890 - modelscope - INFO - TensorFlow version 2.13.0 Found. 2024-01-03 14:58:58,890 - modelscope - INFO - Loading ast index from C:\Users\username.cache\modelscope\ast_indexer 2024-01-03 14:58:58,988 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 08d3d34944933ce0fe70855f540131f5 and a total number of 946 components indexed 2024-01-03 14:59:02,484 - modelscope - INFO - Use user-specified model revision: v1.1.0 Downloading: 100%|████████████████████████████████████████████████████████████▉| 5.34G/5.34G [34:17<00:00, 2.78MB/s] 2024-01-03 15:33:32,806 - modelscope - ERROR - File C:\Users\username.cache\modelscope\hub\temp\tmppr3kigdn\anytext_v1.1.ckpt integrity check failed, the download may be incomplete, please try again. Traceback (most recent call last): File "C:\Users\username\Documents\ASTRI\repo\fake_detect\AnyText\demo.py", line 21, in inference = pipeline('my-anytext-task', model='damo/cv_anytext_text_generation_editing', model_revision='v1.1.0') File "C:\Users\username\anaconda3\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 115, in pipeline model = normalize_model_input( File "C:\Users\username\anaconda3\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 36, in normalize_model_input model = snapshot_download( File "C:\Users\username\anaconda3\envs\anytext\lib\site-packages\modelscope\hub\snapshot_download.py", line 159, in snapshot_download file_integrity_validation(temp_file, model_file[FILE_HASH]) File "C:\Users\username\anaconda3\envs\anytext\lib\site-packages\modelscope\hub\utils\utils.py", line 94, in file_integrity_validation raise FileIntegrityError(msg) modelscope.hub.errors.FileIntegrityError: File C:\Users\username.cache\modelscope\hub\temp\tmppr3kigdn\anytext_v1.1.ckpt integrity check failed, the download may be incomplete, please try again.

brianyuastri avatar Jan 03 '24 07:01 brianyuastri

P.S. I tried this on my Linux machine and the same error still persist

brianyuastri avatar Jan 03 '24 09:01 brianyuastri

@brianyuastri Did you solve this problem? I have still met this problem :(

samsara-ku avatar Jan 08 '24 08:01 samsara-ku

@brianyuastri Did you solve this problem? I have still met this problem :(

No

brianyuastri avatar Jan 08 '24 08:01 brianyuastri

According to the modelscope, when the model file is downloaded for the first time, the model file's sha256 is computed using hashlib.sha256(), and this value should be exactly the same as:

SHA256: 09c88d145aa08f067641dc1d10c8890855939fa756d4cdc991e781a5f3918f59

I don't know why you guys got this integrity check failed. Maybe you can try downloading the model manually.

tyxsspa avatar Jan 08 '24 11:01 tyxsspa

According to the modelscope, when the model file is downloaded for the first time, the model file's sha256 is computed using hashlib.sha256(), and this value should be exactly the same as:

SHA256: 09c88d145aa08f067641dc1d10c8890855939fa756d4cdc991e781a5f3918f59

I don't know why you guys got this integrity check failed. Maybe you can try downloading the model manually.

Hi tyxsspa, I downloaded the model manually but I don't know where to put it, could you point me to the location?

shrewen avatar Jan 08 '24 14:01 shrewen

the model should locate on ~/.cache/modelscope/hub/damo/cv_anytext_text_generation_editing

boringtaskai avatar Jan 08 '24 23:01 boringtaskai

the model should locate on ~/.cache/modelscope/hub/damo/cv_anytext_text_generation_editing

I tried putting it there, but comfyui is ignoring it and it's trying to redownload the model, for what it's worth the filename is anytext_v1.1.ckpt, do I need to rename it?

shrewen avatar Jan 09 '24 14:01 shrewen

螢幕擷取畫面 2024-02-03 164447 Same issue. Even if the model file has been manually downloaded and is located in the correct path, the file will still be redownloaded and error messages will be displayed.

OS: Windows 11

Does anyone know how to fix it?

rookiestar28 avatar Feb 03 '24 06:02 rookiestar28