Delete models/Lora/mihari-test.py
Browse files- models/Lora/mihari-test.py +0 -24
models/Lora/mihari-test.py
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
import hashlib
|
2 |
-
|
3 |
-
みはりhash = "F0B3321134"
|
4 |
-
|
5 |
-
# SHA256ハッシュ値計算の関数を登録
|
6 |
-
def calculate_sha256(file_path):
|
7 |
-
sha256 = hashlib.sha256()
|
8 |
-
with open(file_path, "rb") as f:
|
9 |
-
while True:
|
10 |
-
data = f.read(4096) # ファイルを4096バイトずつ読み込む
|
11 |
-
if not data:
|
12 |
-
break
|
13 |
-
sha256.update(data)
|
14 |
-
return sha256.hexdigest().upper()[:10]
|
15 |
-
|
16 |
-
DLhash = calculate_sha256("oyama-mihari_ver2_onimai_PONY_last.safetensors")
|
17 |
-
print(f"\nDLしたファイルのハッシュ値: {DLhash}\nみはりLoraのハッシュ値: {みはりhash}\n")
|
18 |
-
|
19 |
-
if DLhash==みはりhash:
|
20 |
-
print("ハッシュ値が一致しました。ファイルは正常です")
|
21 |
-
else:
|
22 |
-
print("ハッシュ値が一致しません。ファイルが異常があります。")
|
23 |
-
|
24 |
-
input()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|