Closed MarcusNyne closed 4 months ago
p.outpath_samples
sub dir shared.opts.directories_filename_pattern
setting also needs to accounted forCreate info text file
this means getting the output directory name is not as straightforward
I believe it may simplify the writing of info
if you register a call back with on_before_image_saved
on_before_image_saved
this way you directly have access to the final file path where the image is saved
depends on your use case you could either register a call back and then remove it immediately after words or write a permanent call back that will be used conditionally
Create variation folders
if you want to create a subdirectory group it is also possible for you to "temporarily" append to the following pattern of
shared.opts.directories_filename_pattern
and unabe save in sube dir
then restroing the setting beck
note as the name would suggest
directories_filename_pattern
is a pattern similer to theimage file name pattern
code like this shoud work
# save original settings
original_directories_filename_pattern = shared.opts.directories_filename_pattern
original_save_to_dirs = shared.opts.save_to_dirs
if chk_variation_folders:
original_directories_filename_pattern
try:
if shared.opts.save_to_dirs:
shared.opts.directories_filename_pattern = shared.opts.directories_filename_pattern + '/[datetime<%Y%m%d-%H%M%S>]'
else:
shared.opts.directories_filename_pattern = '[datetime<%Y%m%d-%H%M%S>]'
shared.opts.save_to_dirs = Ture
# image save after this before will be saed into sub dir
finally:
# restore original setting in final block to make sure the setting is restored
shared.opts.directories_filename_pattern = original_directories_filename_pattern
shared.opts.save_to_dirs = original_save_to_dirs
this is hand to type untested code
it dose not worrk on img2img tab
hires fix
a refine and other extentionsissue UI JavaScript and elem_id
extra additional conversation
I can tell that you have adopted indication from control-net
, but their use case is different from your, they requires indication of multiple sub-unit, where as your extention only requires oneusing InputAccordions
removed all the JavaScript (apart from the hints) and CSS making a code base easy to maintain
if you go with the sub multiple tabs route I mentiond above then I have no issue with you using controlnet style
your code structure can lead to potential issues in the future
best restructure it like so
extention root
├── README.md
├── your_libs_under_unique_name_across_webui/
│ ├── __init__.py <-- optional: depends on if you want to make a package or not doesn't really matter
│ ├── your_lib_1.py
│ └── your_lib_2.py
└── scripts/
└── best_to_have_one_file_only.py
in best_to_have_one_file_only.py
import your_libs_under_unique_name_across_webui
Tweak Weights
it't doesn't seem to function correctly
I'm not sure what your intention is either it's supposed to replace prompts or replace lora
for me when it replaces prompts with different weights it literally just appended :0.123
after the prompt, but without the parenthesis so the syntax is incorrect, you also have a lora weight, but I've also wasn't able to get it working with lora so that is extra confusing
conclusion
I think the method your implementing extension is a bit unorthodox and can have potential issues, but as it seems to function I will let this one go but please watch out for potential compatibility issues
unless you vehemently object I will ask you to combine your extensions
fix enable indication issues
preferably using InputAccorden the pre-existing solution that is known to work, as opposed to reinventing the wheel
fix the output directory path to respect user subfolder and directories_filename_pattern
settings
remove tha "added": "2024-05-24",
from the entry, it will be automatically generated on merge
transparency I'm currently also working on an extension, but it's purely function as an extension of XYZ I will say your use case is a bit different from mine, but there's also quite a crossover https://github.com/w-e-w/sd-webui-xyz-addon
what does [m9]
mean?
MarcusNyne maybe
@w-e-w , thank you for taking the time to offer comprehensive feedback. Somehow I didn't notice your comment, but I noticed when @light-and-ray commented. Many of your comments are highly technical and I will need to review in detail. I will offer some initial responses, though.
I found a bug when a 0 is entered for certain configurations. I'll fix the bug and review your feedback in more detail. Again, thanks for taking the time to review my extensions.
MarcusNyne maybe
@light-and-ray , are you available on discord? I'm working in the extensions update code which doesn't seem to work for branches. I can see you have worked in this area in March. Can we have a conversation on discord about it? My username is marcusnyne.
I see dry_run=True on the fetch call .. not sure why this is supposed to work since FETCH_HEAD is only updated on installation.
Searched for you in the webui-dev channel but couldn't find you.
I'm not interested in it
MarcusNyne maybe
@light-and-ray , are you available on discord? I'm working in the extensions update code which doesn't seem to work for branches. I can see you have worked in this area in March. Can we have a conversation on discord about it? My username is marcusnyne.
I see dry_run=True on the fetch call .. not sure why this is supposed to work since FETCH_HEAD is only updated on installation.
Searched for you in the webui-dev channel but couldn't find you.
sorry I believe have accidentally ping light-and-ray
@w-e-w, I completed the changes to the extensions. Here is a comprehensive response to your feedback. Thank you for the detailed feedback.
Changes
Other Feedback
I still think the Stable Diffusion: Tweak Weights is working very weirdly as mentioned above but I don't want to care anymore so I'll just let that is an index and let you deal with it
@w-e-w , I wasn't able to reproduce your problem with Tweak Weights. Can you show me an example of a prompt that will reproduce the problem?
I appreciate your help and would like to fix it if I can reproduce it.
Thanks
Info
There are two extensions included here. They have similar functionality but have key differences. I have been using them extensively and found them to be very useful. There is detailed documentation in README.md. Please review for more details. The direct github urls are:
https://github.com/MarcusNyne/sd-scramble-prompts-m9 https://github.com/MarcusNyne/sd-tweak-weights-m9
Feel free to discord me any questions. @marcusnyne
Thank you!!!
Checklist:
Readme.md
index.json
andextension_template.json
have not been modified.entry
is placed in theextensions
directory with the.json
file extension.