Maurdekye / training-picker

Extension for stable-diffusion-webui that allows the user to mux through the keyframes of a video, and automatically pick and export training examples from individual keyframes.
109 stars 15 forks source link

ImportError: cannot import name 'folder_symbol' from 'modules.ui' #21

Closed Harvester62 closed 1 year ago

Harvester62 commented 1 year ago

Please cover these three things in your report:

You can also optionally provide these details if you think it'll help me figure out the issue faster:

Error loading script: training_picker.py Traceback (most recent call last): File "C:\stable-diffusion-webui\modules\scripts.py", line 218, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module exec(compiled, module.dict) File "C:\stable-diffusion-webui\extensions\training-picker\scripts\training_picker.py", line 16, in from modules.ui import create_refresh_button, folder_symbol ImportError: cannot import name 'folder_symbol' from 'modules.ui' (C:\stable-diffusion-webui\modules\ui.py)

GiusTex commented 1 year ago

Same problem Edit: I "fixed" it removing the 'folder_symbol' part, if you remember were are your video and frame folders you used months ago your are fine, this is the file without the folder symbol (change .py in .txt). This file in your case goes there: C:\stable-diffusion-webui\extensions\training-picker\scripts\training_picker.py (move somewhere else the old training_picker.py and change it with this, when there is an update you can delete this). If you don't remember where you set the folder files and can't find them you can't use this (cause there isn't the folder_symbol to find the folders..). training_picker.txt

Harvester62 commented 1 year ago

Thank you @GiusTex for your fix. I don't really use many of the SDWUI extensions but I need them to be installed and activated to be able to localize their UI in Italian. So, I do hope that @Maurdekye will find the time to officially fix this problem. Furthermore, I noticed that the two buttons to the upper right are displayed behind the text box and the texts of the buttons are not visible (see attached screenshot).

Thank you again and I look forward for it to be officially fixed. immagine

itsdotscience commented 1 year ago

This fixed the error and made the extension option appear properly in the UI. Taken from latest automatic1111 git, not setup atm to commit, traveling. Hope this gets ya'll further! :)

Ah, disregard...seems it just lives in ui_common.py

so..

from modules.ui_common import folder_symbol

cheezecrisp commented 1 year ago

~This fixed the error and made the extension option appear properly in the UI. Taken from latest automatic1111 git, not setup atm to commit, traveling. Hope this gets ya'll further! :)~

Ah, disregard...seems it just lives in ui_common.py

so..

from modules.ui_common import folder_symbol

Tried so and the extension UI loads successfully but could not load viedo files. the dropdown menu of video is empty even there are videos in 'videos' folder. Refresh buttom also has no effect.

itsdotscience commented 1 year ago

Where are you storing the videos? When I first got it going it wasn't immediately apparent that they go in

stable-diffusion-webui/training-picker/videos and not stable-diffusion-webui/extensions/training-picker/videos

Of course in the Settings tab under Training Picker you can change this location to wherever.

Hope that helps!

-IDS

cheezecrisp commented 1 year ago

Where are you storing the videos? When I first got it going it wasn't immediately apparent that they go in

stable-diffusion-webui/training-picker/videos and not stable-diffusion-webui/extensions/training-picker/videos

Of course in the Settings tab under Training Picker you can change this location to wherever.

Hope that helps!

-IDS

The path is exactly stable-diffusion-webui/training-picker/videos

itsdotscience commented 1 year ago

Where are you storing the videos? When I first got it going it wasn't immediately apparent that they go in stable-diffusion-webui/training-picker/videos and not stable-diffusion-webui/extensions/training-picker/videos Of course in the Settings tab under Training Picker you can change this location to wherever. Hope that helps! -IDS

The path is exactly stable-diffusion-webui/training-picker/videos

Ah, I'm using absolute paths, drop the stable-diffusion-webui/ part and it should work

rockerBOO commented 1 year ago

I have filed a pull request, #23, that fixes the OP bug and cleans up the UI a little bit.

I do not plan on supporting this further, but made a fork for the meantime for this bug. Can install this as an extension: https://github.com/rockerBOO/training-picker

Harvester62 commented 1 year ago

Thank you @rockerBOO for the PR and fixing this issue. What do you mean when you say that you "do not plan on supporting this further." ? Do you mean that you will no longer contribute to this project, for any reasons? Not that the author @Maurdekye of this extension will no longer support it, right? Thank you.

rockerBOO commented 1 year ago

Well, I meant to say that I wasn't going to maintain a fork, and was just a temporary thing for people to be able to install and use this. Also, that it was not my intention of supporting (maintaining) a fork. Would rather @Maurdekye continue to develop this when they have the chance. Thank you.

Harvester62 commented 1 year ago

Ah, understood. Thank you.

coronet1127 commented 1 year ago

Resolved.

The folder_symbol is now in modules.ui_common

trainingpicker/scripts/training_picker.py

from modules.ui import create_refresh_button, folder_symbol ↓ from modules.ui import create_refresh_button from modules.ui_common import folder_symbol

Fixes