Giter Club home page Giter Club logo

Comments (12)

bmaltais avatar bmaltais commented on July 17, 2024

I will welcome a PR to do this if someone want to tackle it.

from kohya_ss.

AlvaroBadiaAlcaraz avatar AlvaroBadiaAlcaraz commented on July 17, 2024

I can start looking into it, but could you tell me please which files are responsible for the logic of that part?

from kohya_ss.

bmaltais avatar bmaltais commented on July 17, 2024

I can start looking into it, but could you tell me please which files are responsible for the logic of that part?

That is the issue... many files will need to be updated to allow for this. The GUI was not designed to allow this and therefore does not land itself to such a change. It will require a lot of code change and testing across the GUI.

from kohya_ss.

b-fission avatar b-fission commented on July 17, 2024

I think using config.toml or specifying --config=myconfigfile.toml gets very close to fulfilling the requested behavior.

It would be more convenient if there was a way to save/export the toml from the GUI rather than needing to edit it by hand. There's save_config() in class_gui_config.py which appears to be unused.

Also, before anyone asks, the toml files that get generated when starting training are not compatible with config.toml for initializing the GUI.

from kohya_ss.

AlvaroBadiaAlcaraz avatar AlvaroBadiaAlcaraz commented on July 17, 2024

If the config.toml that gets generated is not compatible, how does this file have to be in order to be compatible, also I was thinking of using a json file fot the configuration, do you know if that is compatible?

from kohya_ss.

bmaltais avatar bmaltais commented on July 17, 2024

I might have made bad choices for the default config values. Had I stuck to the json format, I could that made it easy to pass a config and set the gui values to that.

one issue is that each trainer will inherit those values as there is no provision to specify if it is for a Lora, dreambooth or other. So even the json would be messy. There is no clean solution. If gradio allowed to execute a function on load it would be easy to pass a config for a specific tab a load it… but I have not found a way to do that.

this would be the cleanest method.

from kohya_ss.

b-fission avatar b-fission commented on July 17, 2024

If the config.toml that gets generated is not compatible, how does this file have to be in order to be compatible

There is a template file called config example.toml in the main kohya_ss folder that you can use.

...

If gradio allowed to execute a function on load it would be easy to pass a config for a specific tab a load it… but I have not found a way to do that.

Doesn't gradio's gr.Interface.load() provide that capability?
https://www.gradio.app/docs/gradio/interface#interface-load

load
gradio.Interface.load(block, ···)

Description
This listener is triggered when the Interface initially loads in the browser.

from kohya_ss.

AlvaroBadiaAlcaraz avatar AlvaroBadiaAlcaraz commented on July 17, 2024

Sorry i haven't used gradio before, how would that work?

from kohya_ss.

b-fission avatar b-fission commented on July 17, 2024

Sorry i haven't used gradio before, how would that work?

For using a config.toml file? It's not gradio specific, but the quickest way to start is just take config example.toml and save as config.toml in the kohya_ss directory. The gui should be able to load it the next time you start it.

from kohya_ss.

AlvaroBadiaAlcaraz avatar AlvaroBadiaAlcaraz commented on July 17, 2024

Thank you, that was exactly what i was looking for.

On the other hand, do you know is it is possible to call some function in the code from another file to start the training without opening the gui?

from kohya_ss.

b-fission avatar b-fission commented on July 17, 2024

On the other hand, do you know is it is possible to call some function in the code from another file to start the training without opening the gui?

There is a button at the bottom of the gui called "Print training command" which will show the command line (and toml) in the log output. You can use that command to run the training process without the gui.

from kohya_ss.

AlvaroBadiaAlcaraz avatar AlvaroBadiaAlcaraz commented on July 17, 2024

Thank you so much!

from kohya_ss.

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.