Comments (4)
It looks like picklescan is trying to handle a file which is not a pickle file and does not realize it. Would you have instructions on how to setup folder /stable-diffusion-webui-master/models/Stable-diffusion/
so I can try a repro?
Formatted callstack for future reference:
picklescan\cli.py, line 70, in main scan_result = scan_directory_path(path)
picklescan\scanner.py, line 410, in scan_directory_path scan_result.merge(scan_bytes(File, File_path, File_ext))
picklescan\scanner.py, line 350, in scan_bytes return scan_pytorch(data, File_id)
picklescan\scanner.py, line 338, in scan_pytorch magic = get_magic_number(data)
picklescan\torch.py, line 77, in get_magic_number for opcode, args, _pos in genops(data):
lib\pickletools.py, line 2285, in _genops raise ValueError("at position %s, opcode %r unknown" % ( ValueError: at position 2, opcode b'\x03' unknown
from picklescan.
reason for up date:
updated the formatting:
It looks like picklescan is trying to handle a file which is not a pickle file and does not realize it. Would you have instructions on how to setup folder
/stable-diffusion-webui-master/models/Stable-diffusion/
so I can try a repro?Formatted callstack for future reference:
picklescan\cli.py, line 70, in main scan_result = scan_directory_path(path) picklescan\scanner.py, line 410, in scan_directory_path scan_result.merge(scan_bytes(File, File_path, File_ext)) picklescan\scanner.py, line 350, in scan_bytes return scan_pytorch(data, File_id) picklescan\scanner.py, line 338, in scan_pytorch magic = get_magic_number(data) picklescan\torch.py, line 77, in get_magic_number for opcode, args, _pos in genops(data): lib\pickletools.py, line 2285, in _genops raise ValueError("at position %s, opcode %r unknown" % ( ValueError: at position 2, opcode b'\x03' unknown
you mentioning that it was trying to handle a file but didnt know how to, made a light bulb go off, I have 98% hard links in there so i decided to run the scanner on the main folders, and came out with this. ( hard links made no difference. )
G:\HuggingFace\RectalWorm\locons scanned fine
G:\HuggingFace\RectalWorm\models
----------- SCAN SUMMARY -----------
Scanned files: 9
Infected files: 0
Dangerous globals: 0 finish the scan.
now heres an error.
picklescan --path G:\HuggingFace\RectalWorm\loras_new
produced same error.
now all those huggingface dir are direct mirrors of whats on the site. https://huggingface.co/RectalWorm
with all of that done, i decided to start doing a process of elimination, witch surprisingly didnt take long at all, and this is the file thats causing the issue.
https://huggingface.co/RectalWorm/loras_new/resolve/main/Owl_Mage_no_background.pt
hope this helps.
from picklescan.
The file starts with 89 50 4e 47 0d 0a 1a 0a
, which is a PNG file header (in spite of the PyTorch .pt extension). The fix is likely to skip that file.
from picklescan.
The file starts with
89 50 4e 47 0d 0a 1a 0a
, which is a PNG file header (in spite of the PyTorch .pt extension). The fix is likely to skip that file.
ok thank you
from picklescan.
Related Issues (9)
- Handle old PyTorch non-zip format
- Pickle is file extension agnostic HOT 2
- EICAR Test HOT 2
- Dangerous global detection bypass with `inst` instruction HOT 6
- Dangerous global detection bypass with memo dict confusion HOT 2
- Add logs to cli for download
- Possible vulnerability in picklescan==0.0.12 HOT 4
- Add `_pickle` module to unsafe globals HOT 3
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 picklescan.