Code Monkey home page Code Monkey logo

Comments (7)

jhc13 avatar jhc13 commented on May 30, 2024 1

I have added .npz to the list of excluded file types when loading a directory. I think it is safer to specify file types to exclude rather than file types to include in order not to miss any obscure image formats.

from taggui.

YuanGYao avatar YuanGYao commented on May 30, 2024 1

Haha, this is indeed a difficult choice.
On the one hand, it is impossible to determine which file types of images the user will use, and on the other hand, it is impossible to determine whether the user will put other types of files and images in the same folder.
However, because I only use jpg and png file, I made such modifications to the code.

from taggui.

jhc13 avatar jhc13 commented on May 30, 2024 1

Thank you for the suggestions. I will keep them in mind, but I will close the issue for now.

from taggui.

jhc13 avatar jhc13 commented on May 30, 2024

Are you sure TagGUI is creating the .npz files? I haven't seen them being created when I use TagGUI.

.npz seems to be a file format used by NumPy to save arrays (docs), but there's no code in TagGUI that calls NumPy like that.

from taggui.

jhc13 avatar jhc13 commented on May 30, 2024

The .npz files seem to be created by kohya_ss when saving latents to disk (https://github.com/kohya-ss/sd-scripts/blob/main/library/train_util.py#L2007).

from taggui.

YuanGYao avatar YuanGYao commented on May 30, 2024

Yes, kohya_ss will create .npz files if you use the save_latent_to_disk parameter during training. But the .npz file will not cause TagGUI to report an error, it will just appear in the ImageList together with the image (this was the case in the previous version). In response, I modified the code here from excluding json files to only accepting image type files.
From if path.suffix.lower() not in ('.json', '.jsonl') to if path.suffix.lower() in (".png", ".jpg", ".jpeg").

from taggui.

Vendaciousness avatar Vendaciousness commented on May 30, 2024

Man, you guys are amazing! Wanna take over some of my other favorite repos? Anyways, I must've made the NPZs when I ran Kohya_SS and received the error relating to the text captioning file format. I apologize for writing up a bogie, fellas.

I formatted the title, rather than deleting the issue, but I can nuke it if you guys want, just lmk.

I also left the issue open, for you to decide if you want to want to attempt any PRs to address the issue. If you decide to do something about the default, even though no one uses it, you could do one of the following:

  • Add an option to save files as *.caption during generation.
  • Add buttons that rename all caption file extensions in the folder to whichever format, so a 'Make files TXT' button and a 'Make files *.CAPTION' perhaps.
  • Add it as a setting somewhere.

Thanks for the lightning fast response, sorry my own was less so...

from taggui.

Related Issues (20)

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.