Git Product home page Git Product logo

Comments (4)

mmaitre314 avatar mmaitre314 commented on July 16, 2024

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.

whitevamp avatar whitevamp commented on July 16, 2024

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.

mmaitre314 avatar mmaitre314 commented on July 16, 2024

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.

whitevamp avatar whitevamp commented on July 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.