-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gui fix #2025
Gui fix #2025
Conversation
- use sys.executable - check *_dir validity and remove doublequotes strip - set `scriptdir` - use gr.update() - unify Folders for finetune - use subprocess.run(run_cmd, shell=True, env=env)
Is there a reason for reverting back to gr.update? This method has been deprecated by Gradio in recent release. |
Oh! I didn't know that, I'm testing/fixing on gradio 3.43.2 env. for sd-webui extension testing. |
The gradio recent update don't need the .update part either... if it is included it will cause the deprecation warning... According to Gradio But testing the current commit it does not appear to throw a warning... so I guess this should be ok until it does ;-) Are you doing this so thew code work well under auto1111 gradio version? He is using |
oops..
|
One possibility would be to backrev the gradio version to align with a1111... but for now don't bother... I think it is still supported and not throwing a fix about the deprecation... I wish I could start over the GUI code and just "clone" the sd-script folder during setup and leverage that for execution for the GUI. Right now both are sort of intertwine and not the best... but it is what it is ;-) When I started coding the GUI kohya did not us git so I was copying his "notes" as code in my repo. After we talked a bit more he decided to adopt my gui structure but in his own repo... so there started the mess of code it is ;-) But with the refactoring you have started to do I could see the possibility of totally removing his code from my repo and just "clone" a specific commit for use instead of carrying his code base in mine... this would prevent users from attempting to commit updates to kohya's code in my repo... |
oh!! thank you for the detailed explanation. yes, that would be one possible way. (+ git submodules or some scripts?) |
I am starting to investigate how feasible it would be... I will see if I can clone sd-script at the root of my repo, then switch to a specific commit, .gitignore it so it does not turn into a submodule, then update my requirements.txt file to build the library from If that work then the kohya_gui would be clean of all sd-scripts files and then contain only pure code just for the gui... and all calls for execution would go to the sd-script cloned folder... Not sure if it is worth doing... but this would probably be the best. |
OK... it look like it might work... I did a quick test on a subset of the code (just running lora_gui.py, and there was no issues using the library build from the cloned folder... Now, this is a significant change and I don't want to introduce too many issues for the work you have started. So how should we proceed with this... let the changes you have done stabilise and then attempt to clense the repo from sd-scripts files... or attempt to do this while being at code refactoring... |
@wkpark I have created a dev-pure branch for experimenting... the hard part will be the setup of the right sd-scripts release supported by the gui... and progressing from release to release... but my minimal test is working... I will keep trimming it more and more until it is as clean as possible |
@wkpark I think this is really looking good... I am slowly testing each utility and training script to make sure there are no surprises... but I think it is very doable to get to a "pure" gui repo and only leverage a cloned version of sd-scripts release... So... right now I can do the windows setup cloning using the setup.bat script... but not linux... This will need to be fixed I guess. Also, I don't know what kind of an effect this might have on your a1111 extension. Are you mostly using windows or linux? If you use linux, would you prefer to figure out the best cloning approach for it? |
I have gone over pretty much all the GUI tools and there does not appear to be any errors... so I think this is totally viable... |
@bmaltais you did amazing job!! a1111 extension works well with minor fixes. thanks again! |
*_dir
validity and removeremove_doublequote()
scriptdir
useusegr.update()
gr.*.update()
subprocess.run(run_cmd, shell=True, env=env)
print_only_bool