Skip to content
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

File Dialog not working #694

Closed
threadedblue opened this issue May 1, 2023 · 7 comments
Closed

File Dialog not working #694

threadedblue opened this issue May 1, 2023 · 7 comments

Comments

@threadedblue
Copy link

I am using M1 Mac 13.3.1
I ran ./startup.sh
I start kohya_ss with ./gui.sh
The UI appears to function normally until it needs to interact with the file system. I'm talking file select dialogs, save operations, et. al. IOW If I click to open a file dialog, nothing happens. The FD is not even hidden behind other windows.

Although I am not much of a python guy, I did run a little test to see if there was an issue with tkinter and there is not. I can get an FC to popup. It's only inside kohya_ss that the problem occurs.

As best I can tell, I found an example of the problem in common_gui.py right near line 158.

def get_any_file_path(file_path=''): if not any(var in os.environ for var in ENV_EXCLUSION) and sys.platform != 'darwin': current_file_path = file_path

Execution is not passing the if statement (above). I can tell that "var" is not defined.

Q: Am I missing something? Did setup.sh fail me?

Thanks

@bmaltais
Copy link
Owner

bmaltais commented May 1, 2023

Someone using linux and/or macos need to fix this. I don't use those platform so I can't really fix the Dialog issue on those platform. However, it's worth noting that macOS can be challenging when it comes to managing UI and Python.

@WingedWalrusLandingOnWater

I'm having the same issue as of today!

possibly somehow caused by whatever was going on with stable diffusion this morning??? it deleted like 300files when i loaded SD I spend a good hour sorting it all out to get SD working as it should then I come back to do some training on Kohya and I can't get the file system to load.

@threadedblue
Copy link
Author

Thanks for the response. Maybe I can fix. Can you give me a clue as to the "var" that is not getting defined. Where does it come from? How should it be populated?

Thanks

@WingedWalrusLandingOnWater

as of today mine is working as it should with no actions taken to correct it, IDK about the OP.

@amkurup
Copy link

amkurup commented May 25, 2023

Any update on this? I am still having this issue on MacOS (M1)

@andupotorac
Copy link

Note that even if the file dialog doesn't work, you can still use it. Do this: copy the path of your config file (right click + option on the file in Finder), and add the path to the config, where you train lora in A1111.

Then, click load. Make any changes you need to it, click save (it does save, see Terminal), and then start Training.

So while we wait for a fix for the file picker, this should be a way to use the app in the meantime.

bmaltais pushed a commit that referenced this issue Jul 29, 2023
support ckpt without position id in sd v1 #687
@abesmon
Copy link

abesmon commented Nov 8, 2023

@threadedblue execution is not passing because of sys.platform != 'darwin' (which checking if you have macOS). If you remove it, the code will proceed. BUT! It was placed here on purpose. Later in code there is a call to tkinter window creation, and if you remove sys.platform != 'darwin' everything would simply crash because tkinter window creation can't be made on any thread different to Main (and we'r here not on main). So problem here is that window need to be created on main thread, but I think there is no easy solution for that :( (if there is one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants