Closed Tillerz closed 10 months ago
yup, applying settins from prompt needs an update but instead of doing it one-by-one, can you do a comprehensive list of what works ok and what not? otherwise we'll be running in circles for a while...
Sure, will do some testing. :)
Here's the list of things that do not get restored (from top to bottom in the order as they appear in the UI):
brownian noise
discard penultimate sigma
Sigma algorithm
Secondary CFG scale
Guidance rescale
Full quality
Face restore
Enable second pass
Secondary Sampler
Denoising Strength
Upscaler
Hires steps
Upscale by
And then the "Override settings" thingers that always gets set: ToMe hires: ...
i've just redesigned old prompt parsing for params function completely, we should start from scratch and see what now works. note that first 3 (brownian noise, discard, sigma) need to be handled differently, so i know those don't work.
also, you can set env variable SD_PASTE_DEBUG=true
for extra information during parsing.
version: 28365d6b
Ok, that's easy now. It doesn't restore ANYTHING.
All it does is wipe "Negative prompt" (and not set it to what it should be).
18:16:53-154947 DEBUG Paste prompt current: 1
18:16:53-156447 INFO Parse apply: 'Prompt'=fast car
18:16:53-157447 INFO Parse apply: 'Negative prompt'=bw
18:16:53-158447 INFO Parse apply: '<function Script.ui.<locals>.<lambda> at 0x0000022D8C1104C0>'={'value': [], '__type__': 'generic_update'}
18:16:53-159447 INFO Parse apply: '<function Script.ui.<locals>.<lambda> at 0x0000022D8C110670>'={'value': [], '__type__': 'generic_update'}
18:16:53-160447 INFO Parse apply: '<function Script.ui.<locals>.<lambda> at 0x0000022D8C111F30>'={'value': [], '__type__': 'generic_update'}
18:16:53-161448 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.<lambda> at 0x0000022D8D1EB9A0>'={'value': 'None', '__type__': 'generic_update'}
18:16:53-162447 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x0000022D8C112EF0>'={'visible': False, '__type__': 'generic_update'}
18:16:53-163447 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x0000022D8C112EF0>'={'visible': False, '__type__': 'generic_update'}
18:16:53-164447 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x0000022D8C112EF0>'={'visible': False, '__type__': 'generic_update'}
18:16:53-165447 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x0000022D8C112EF0>'={'visible': False, '__type__': 'generic_update'}
18:16:53-166447 INFO Parse apply: '<function connect_paste.<locals>.paste_settings at 0x0000022D8EB10310>'={'choices': [], 'label': None, 'info': None, 'show_label': None, 'container': None, 'scale': None, 'min_width': None, 'visible': False,
'value': [], 'interactive': None, 'placeholder': None, '__type__': 'update'}
try again, had one bug :)
Hm, no, I do not see any difference. it's not doing shit. :-(
version: 3c9c9cf4
It shows me the correct Prompt and Negative prompt in the parse output, and then those other lines. Still only wiping Negative prompt.
Oh wait. Even worse. When I change the settings and then click Restore, it doesn't show the last settings in the parse output (from 1.), it shows the CURRENT Prompt/Negative prompt (from 3.) in the parse output. Shouldn't it grab what's in the params.txt, the settings I had before generating the image? Weird.
As if it's parsing the settings and overwriting them with themselves instead of applying the previous settings.
18:40:35-368920 INFO Parse apply: 'Prompt'=1
18:40:35-369920 INFO Parse apply: 'Negative prompt'=
18:40:35-370420 INFO Parse apply: '<function Script.ui.<locals>.<lambda> at 0x000002510D2E8700>'={'value': [], '__type__': 'generic_update'}
18:40:35-371420 INFO Parse apply: '<function Script.ui.<locals>.<lambda> at 0x000002510D2E8940>'={'value': [], '__type__': 'generic_update'}
18:40:35-372420 INFO Parse apply: '<function Script.ui.<locals>.<lambda> at 0x000002510D2E8790>'={'value': [], '__type__': 'generic_update'}
18:40:35-372920 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.<lambda> at 0x000002510D3F3AC0>'={'value': 'None', '__type__': 'generic_update'}
18:40:35-373920 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000002510D2EB010>'={'visible': False, '__type__': 'generic_update'}
18:40:35-374420 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000002510D2EB010>'={'visible': False, '__type__': 'generic_update'}
18:40:35-375420 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000002510D2EB010>'={'visible': False, '__type__': 'generic_update'}
18:40:35-375920 INFO Parse apply: '<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000002510D2EB010>'={'visible': False, '__type__': 'generic_update'}
18:40:35-376920 INFO Parse apply: '<function connect_paste.<locals>.paste_settings at 0x000002510EE5C430>'={'choices': [], 'label': None, 'info': None, 'show_label': None, 'container': None,
'scale': None, 'min_width': None, 'visible': False, 'value': [], 'interactive': None, 'placeholder': None, '__type__': 'update'}
Damn OK, I'll spend a bit more time on thar when I get back home.
ok, another try - please upgrade and test.
for reference, restore button uses CURRENT prompt if it exist and reads params.txt
(previous generation) if current prompt is empty. this is desired behavior so ppl can copy&paste into prompt and press restore.
this is the list of all of the fields currently covered in the code (quite long):
txt2img = [
# prompt
(txt2img_prompt, "Prompt"),
(txt2img_negative_prompt, "Negative prompt"),
# main
(width, "Size-1"),
(height, "Size-2"),
# sampler
(sampler_index, "Sampler"),
(steps, "Steps"),
# batch
(batch_count, "Batch-1"),
(batch_size, "Batch-2"),
# seed
(seed, "Seed"),
(subseed, "Variation seed"),
(subseed_strength, "Variation strength"),
# advanced
(cfg_scale, "CFG scale"),
(clip_skip, "Clip skip"),
(image_cfg_scale, "Image CFG scale"),
(diffusers_guidance_rescale, "CFG rescale"),
(full_quality, "Full quality"),
(restore_faces, "Face restoration"),
(tiling, "Tiling"),
# second pass
(enable_hr, "Second pass"),
(latent_index, "Latent sampler"),
(denoising_strength, "Denoising strength"),
(hr_upscaler, "Hires upscaler"),
(hr_force, "Hires force"),
(hr_second_pass_steps, "Hires steps"),
(hr_scale, "Hires upscale"),
(hr_resize_x, "Hires resize-1"),
(hr_resize_y, "Hires resize-2"),
# refiner
(refiner_start, "Refiner start"),
(refiner_steps, "Refiner steps"),
(refiner_prompt, "Prompt2"),
(refiner_negative, "Negative2"),
]
img2img = [
# prompt
(img2img_prompt, "Prompt"),
(img2img_negative_prompt, "Negative prompt"),
# sampler
(sampler_index, "Sampler"),
(steps, "Steps"),
# resize
(resize_mode, "Resize mode"),
(width, "Size-1"),
(height, "Size-2"),
(scale_by, "Resize scale"),
# batch
(batch_count, "Batch-1"),
(batch_size, "Batch-2"),
# seed
(seed, "Seed"),
(subseed, "Variation seed"),
(subseed_strength, "Variation strength"),
# denoise
(denoising_strength, "Denoising strength"),
(refiner_start, "Refiner start"),
# advanced
(cfg_scale, "CFG scale"),
(image_cfg_scale, "Image CFG scale"),
(clip_skip, "Clip skip"),
(diffusers_guidance_rescale, "CFG rescale"),
(full_quality, "Full quality"),
(restore_faces, "Face restoration"),
(tiling, "Tiling"),
# inpaint
(mask_blur, "Mask blur"),
(mask_alpha, "Mask alpha"),
(inpainting_mask_invert, "Mask invert"),
(inpainting_fill, "Masked content"),
(inpaint_full_res, "Mask area"),
(inpaint_full_res_padding, "Masked padding"),
]
override = [
('Backend', 'sd_backend'),
('Model hash', 'sd_model_checkpoint'),
('Refiner', 'sd_model_refiner'),
('VAE', 'sd_vae'),
('Parser', 'prompt_attention'),
('Color correction', 'img2img_color_correction'),
('LoRA method', 'diffusers_lora_loader'),
# Samplers
('Sampler Eta', 'scheduler_eta'),
('Sampler ENSD', 'eta_noise_seed_delta'),
('Sampler order', 'schedulers_solver_order'),
# Samplers diffusers
('Sampler beta schedule', 'schedulers_beta_schedule'),
('Sampler beta start', 'schedulers_beta_start'),
('Sampler beta end', 'schedulers_beta_end'),
('Sampler DPM solver', 'schedulers_dpm_solver'),
# Samplers original
('Sampler brownian', 'schedulers_brownian_noise'),
('Sampler discard', 'schedulers_discard_penultimate'),
('Sampler dyn threshold', 'schedulers_use_thresholding'),
('Sampler karras', 'schedulers_use_karras'),
('Sampler low order', 'schedulers_use_loworder'),
('Sampler quantization', 'enable_quantization'),
('Sampler sigma', 'schedulers_sigma'),
('Sampler sigma min', 's_min'),
('Sampler sigma max', 's_max'),
('Sampler sigma churn', 's_churn'),
('Sampler sigma uncond', 's_min_uncond'),
('Sampler sigma noise', 's_noise'),
('Sampler sigma tmin', 's_tmin'),
('Sampler ENSM', 'initial_noise_multiplier'),
('UniPC skip type', 'uni_pc_skip_type'),
('UniPC variant', 'uni_pc_variant'),
# Token Merging
('Mask weight', 'inpainting_mask_weight'),
('Token merging ratio', 'token_merging_ratio'),
('ToMe', 'token_merging_ratio'),
('ToMe hires', 'token_merging_ratio_hr'),
('ToMe img2img', 'token_merging_ratio_img2img'),
]
Maybe I am testing wrong. It's never loading anything, just killing the negative prompt.
"this is desired behavior so ppl can copy&paste into prompt and press restore." ... this doesn't make any sense to me. if you copy past into prompt and then click restore, it would load the old prompt, so why would could paste something in before? If it doesn't load the old prompt, why even click restore?
I personally have 2 use cases.
I want to make new stuff. That's what I have the default ui settings set to. Some basic render settings + prompt that I can start with and then change as needed.
Restart of SD, and I want to continue where I left off: click Reload... it should then load the meta of the last thing I generated.
This is the current output on Restore:
16:11:28-309391 DEBUG Paste prompt: type="current" prompt="fast car"
16:11:28-310891 DEBUG Settings overrides: []
16:11:28-311393 INFO Parse apply: {'Prompt': 'fast car', 'Negative prompt': '', <function Script.ui.<locals>.<lambda> at
0x000001510CD883A0>: {'value': [], '__type__': 'generic_update'}, <function Script.ui.<locals>.<lambda> at
0x000001510CD88310>: {'value': [], '__type__': 'generic_update'}, <function Script.ui.<locals>.<lambda> at
0x000001510CD88280>: {'value': [], '__type__': 'generic_update'}, <function ScriptRunner.setup_ui.<locals>.<lambda>
at 0x000001510CE5BD90>: {'value': 'None', '__type__': 'generic_update'}, <function
ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000001510CD89870>: {'visible': False, '__type__':
'generic_update'}, <function connect_paste.<locals>.paste_settings at 0x000001510EAF4670>: {'choices': [], 'label':
None, 'info': None, 'show_label': None, 'container': None, 'scale': None, 'min_width': None, 'visible': False,
'value': [], 'interactive': None, 'placeholder': None, '__type__': 'update'}}
params.txt:
fast car
Negative prompt: bw
Steps: 50, Seed: 3933460404, Sampler: Euler a, CFG scale: 6, Size: 512x512, Parser: Full parser, Model: aZovyaRPGArtistTools_v3VAE-pruned, Model hash: 2b399373bc, Backend: Original, App: SD.Next, Version: 7cbd2bc, Comment: , Operations: none, Sampler sigma: polyexponential, ToMe: 0.5, ToMe hires: 0.5
if i create an image and want to send you params, i can just send you a text item (as visible in process tab). you paste it into prompt and press restore. or you can drag and drop image into prompt and it will read image metadata and populate prompt.
that is not going to change. if you want to restore previous image settings, you simply empty the prompt before pressing restore.
and yes, if you press restore after fresh server startup, it restores last known settings - exactly because prompt is empty.
Maybe I am testing wrong. It's never loading anything, just killing the negative prompt.
i don't know - tell me how you're testing.
Posted it further above.
When it still worked it always replaced whatever was in prompt/negative prompt, and changed all the settings below. Now it's just a negative prompt nullifier. :)
Ok! Apparently I have to empty "Prompt", then it does something. That is not like it was before.
So here's the list of what's not changing:
txt2img
brownian noise
discard penultimate sigma
sigma algorithm (default, karras, exponential, polyexponential)
Secondary CFG scale
Guidance rescale
Face restore
Tiling
Enable second pass
Secondary sampler
Denoising strength
Upscaler
Force Hires
Hires steps
Upscale by
And it did set
where at least the first one shouldn't appear but set the value of the field.
The other one is the "Token Merging", right? Still have to figure out how that is working as it seems to have quite some impact and should not be hidden in the Settings tab.
ALso the log output makes more sense now.
16:29:11-218842 DEBUG Paste prompt: type="params" prompt="bla
Negative prompt: bw
Steps: 50, Seed: 3933460404, Sampler: Euler a, CFG scale: 6, Size: 512x512, Parser: Full parser, Model:
aZovyaRPGArtistTools_v3VAE-pruned, Model hash: 2b399373bc, Backend: Original, App: SD.Next, Version: 7cbd2bc,
Comment: , Operations: none, Sampler brownian: False, Sampler sigma: polyexponential, ToMe: 0.5, ToMe hires: 0.5"
16:29:11-219843 INFO Parse prompt: {'Prompt': 'bla', 'Negative prompt': 'bw', 'Steps': '50', 'Seed': '3933460404', 'Sampler': 'Euler a',
'CFG scale': '6', 'Size-1': '512', 'Size-2': '512', 'Parser': 'Full parser', 'Model':
'aZovyaRPGArtistTools_v3VAE-pruned', 'Model hash': '2b399373bc', 'Backend': 'Original', 'App': 'SD.Next',
'Version': '7cbd2bc', 'Operations': 'none', 'Sampler brownian': 'False', 'Sampler sigma': 'polyexponential',
'ToMe': '0.5', 'ToMe hires': '0.5', 'Full quality': True}
16:29:11-222350 DEBUG Settings overrides: ['Sampler sigma: polyexponential', 'ToMe hires: 0.5']
16:29:11-222850 INFO Parse apply: {'Prompt': 'bla', 'Negative prompt': 'bw', 'Size-1': 512, 'Size-2': 512, 'Sampler': 'Euler a',
'Steps': 50, 'Seed': 3933460404.0, 'CFG scale': 6, 'Full quality': True, <function Script.ui.<locals>.<lambda> at
0x000001510CD883A0>: {'value': [], '__type__': 'generic_update'}, <function Script.ui.<locals>.<lambda> at
0x000001510CD88310>: {'value': [], '__type__': 'generic_update'}, <function Script.ui.<locals>.<lambda> at
0x000001510CD88280>: {'value': [], '__type__': 'generic_update'}, <function ScriptRunner.setup_ui.<locals>.<lambda>
at 0x000001510CE5BD90>: {'value': 'None', '__type__': 'generic_update'}, <function
ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000001510CD89870>: {'visible': False, '__type__':
'generic_update'}, <function connect_paste.<locals>.paste_settings at 0x000001510EAF4670>: {'choices': ['Sampler
sigma: polyexponential', 'ToMe hires: 0.5'], 'label': None, 'info': None, 'show_label': None, 'container': None,
'scale': None, 'min_width': None, 'visible': True, 'value': ['Sampler sigma: polyexponential', 'ToMe hires: 0.5'],
'interactive': None, 'placeholder': None, '__type__': 'update'}}```
When it still worked it always replaced whatever was in prompt/negative prompt, and changed all the settings below. Now it's just a negative prompt nullifier. :)
because if you only have prompt, thats only thing to parse. yes, its different. i consider it a good thing.
So here's the list of what's not changing:
txt2img
brownian noise discard penultimate sigma sigma algorithm (default, karras, exponential, polyexponential) Secondary CFG scale Guidance rescale Face restore Tiling Enable second pass Secondary sampler Denoising strength Upscaler Force Hires Hires steps Upscale by
And it did set
where at least the first one shouldn't appear but set the value of the field.
The other one is the "Token Merging", right? Still have to figure out how that is working as it seems to have quite some impact and should not be hidden in the Settings tab.
ALso the log output makes more sense now.
16:29:11-218842 DEBUG Paste prompt: type="params" prompt="bla Negative prompt: bw Steps: 50, Seed: 3933460404, Sampler: Euler a, CFG scale: 6, Size: 512x512, Parser: Full parser, Model: aZovyaRPGArtistTools_v3VAE-pruned, Model hash: 2b399373bc, Backend: Original, App: SD.Next, Version: 7cbd2bc, Comment: , Operations: none, Sampler brownian: False, Sampler sigma: polyexponential, ToMe: 0.5, ToMe hires: 0.5" 16:29:11-219843 INFO Parse prompt: {'Prompt': 'bla', 'Negative prompt': 'bw', 'Steps': '50', 'Seed': '3933460404', 'Sampler': 'Euler a', 'CFG scale': '6', 'Size-1': '512', 'Size-2': '512', 'Parser': 'Full parser', 'Model': 'aZovyaRPGArtistTools_v3VAE-pruned', 'Model hash': '2b399373bc', 'Backend': 'Original', 'App': 'SD.Next', 'Version': '7cbd2bc', 'Operations': 'none', 'Sampler brownian': 'False', 'Sampler sigma': 'polyexponential', 'ToMe': '0.5', 'ToMe hires': '0.5', 'Full quality': True} 16:29:11-222350 DEBUG Settings overrides: ['Sampler sigma: polyexponential', 'ToMe hires: 0.5'] 16:29:11-222850 INFO Parse apply: {'Prompt': 'bla', 'Negative prompt': 'bw', 'Size-1': 512, 'Size-2': 512, 'Sampler': 'Euler a', 'Steps': 50, 'Seed': 3933460404.0, 'CFG scale': 6, 'Full quality': True, <function Script.ui.<locals>.<lambda> at 0x000001510CD883A0>: {'value': [], '__type__': 'generic_update'}, <function Script.ui.<locals>.<lambda> at 0x000001510CD88310>: {'value': [], '__type__': 'generic_update'}, <function Script.ui.<locals>.<lambda> at 0x000001510CD88280>: {'value': [], '__type__': 'generic_update'}, <function ScriptRunner.setup_ui.<locals>.<lambda> at 0x000001510CE5BD90>: {'value': 'None', '__type__': 'generic_update'}, <function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000001510CD89870>: {'visible': False, '__type__': 'generic_update'}, <function connect_paste.<locals>.paste_settings at 0x000001510EAF4670>: {'choices': ['Sampler sigma: polyexponential', 'ToMe hires: 0.5'], 'label': None, 'info': None, 'show_label': None, 'container': None, 'scale': None, 'min_width': None, 'visible': True, 'value': ['Sampler sigma: polyexponential', 'ToMe hires: 0.5'], 'interactive': None, 'placeholder': None, '__type__': 'update'}}```
i'll check those.
regarding this list:
brownian noise
discard penultimate sigma
sigma algorithm (default, karras, exponential, polyexponential)
Secondary CFG scale
Guidance rescale
Face restore
Tiling
Enable second pass
Secondary sampler
Denoising strength
Upscaler
Force Hires
Hires steps
Upscale by
note that any setting is stored in metadata only if it differs from default setting. so lets make sure first they are actually in image metadata - because i tried some of them and they did work.
for example, if image was generated using default Secondary CFG scale
, that value is not included in metadata.
and if you change that setting in the UI and then restore from image or last params, there is nothing to restore it to.
and writing all possible metadata all the time would result in massive metadata - there is a limit how much can be stored safely.
Ok. Did reload UI to get default. Changed every value non-default, rendered image, took screenshot of the settings, cleaned prompt field, Reloaded, compared to the screenshot.
brownian noise
discard penultimate sigma
sigma algorithm (default, karras, exponential, polyexponential)
Secondary CFG scale
Guidance rescale
Face restore
Enable second pass
Secondary sampler
Denoising strength
Upscaler
Force Hires
Hires steps
Upscale by
The only one that I could remove is 'Tiling', that indeed gets reset by Reload.
And this is set:
i believe you, but give me something to work with! i've added debug statements exactly so we can trace this kind of things.
18:51:15-630467 DEBUG Paste prompt: type="params" prompt="steampunk airship
Negative prompt: bw
Steps: 40, Seed: 752166682, Sampler: DPM++ 3M SDE, CFG scale: 3.5, Size: 520x520, Parser: Full parser, Model:
aZovyaRPGArtistTools_v3VAE-pruned, Model hash: 2b399373bc, VAE: TAESD, Clip skip: 2, Tiling: True, Backend:
Original, App: SD.Next, Version: 7cbd2bc, Comment: , Operations: none, Sampler discard: False, Sampler sigma:
polyexponential, ToMe: 0.5, ToMe hires: 0.5"
18:51:15-632467 INFO Parse prompt: {'Prompt': 'steampunk airship', 'Negative prompt': 'bw', 'Steps': '40', 'Seed': '752166682',
'Sampler': 'DPM++ 3M SDE', 'CFG scale': '3.5', 'Size-1': '520', 'Size-2': '520', 'Parser': 'Full parser', 'Model':
'aZovyaRPGArtistTools_v3VAE-pruned', 'Model hash': '2b399373bc', 'VAE': 'TAESD', 'Clip skip': '2', 'Tiling':
'True', 'Backend': 'Original', 'App': 'SD.Next', 'Version': '7cbd2bc', 'Operations': 'none', 'Sampler discard':
'False', 'Sampler sigma': 'polyexponential', 'ToMe': '0.5', 'ToMe hires': '0.5', 'Full quality': False}
18:51:15-633967 DEBUG Settings overrides: ['Sampler discard: False', 'Sampler sigma: polyexponential', 'ToMe hires: 0.5']
18:51:15-634967 INFO Parse apply: {'Prompt': 'steampunk airship', 'Negative prompt': 'bw', 'Size-1': 520, 'Size-2': 520, 'Sampler':
'DPM++ 3M SDE', 'Steps': 40, 'Seed': 752166682.0, 'Clip skip': 2, 'Full quality': False, 'Tiling': True, <function
Script.ui.<locals>.<lambda> at 0x000002B00C3C6D40>: {'value': [], '__type__': 'generic_update'}, <function
Script.ui.<locals>.<lambda> at 0x000002B00C3C72E0>: {'value': [], '__type__': 'generic_update'}, <function
Script.ui.<locals>.<lambda> at 0x000002B00C3C76D0>: {'value': [], '__type__': 'generic_update'}, <function
ScriptRunner.setup_ui.<locals>.<lambda> at 0x000002B00D50B9A0>: {'value': 'None', '__type__': 'generic_update'},
<function ScriptRunner.setup_ui.<locals>.onload_script_visibility at 0x000002B00D425480>: {'visible': False,
'__type__': 'generic_update'}, <function connect_paste.<locals>.paste_settings at 0x000002B00F1203A0>: {'choices':
['Sampler discard: False', 'Sampler sigma: polyexponential', 'ToMe hires: 0.5'], 'label': None, 'info': None,
'show_label': None, 'container': None, 'scale': None, 'min_width': None, 'visible': True, 'value': ['Sampler
discard: False', 'Sampler sigma: polyexponential', 'ToMe hires: 0.5'], 'interactive': None, 'placeholder': None,
'__type__': 'update'}}
all params you've listed are actually handled, but they are only added to image metadata conditionally. and in your case, they were never added to metadata since conditions were not met.
what's really strange is that your metadata has Operations: none
. how did you create the image?
for example, if i run txt2img with hires, i have Operations: txt2img; hires
and then check for conditions passes and params are added to metadata.
Ok, here it goes:
webui.bat --upgrade --debug
Log:
09:16:20-182169 INFO Cross-attention: optimization=Scaled-Dot-Product options=[]
09:16:20-631522 INFO Load embeddings: loaded=17 skipped=1 time=0.45
09:16:20-635521 INFO Model loaded in 12.22 { load=0.17 create=5.04 apply=6.13 move=0.39 embeddings=0.45 }
09:16:20-925551 DEBUG gc: collected=19676 device=cuda {'ram': {'used': 5.57, 'total': 63.14}, 'gpu': {'used': 5.68, 'total': 23.99},
'retries': 0, 'oom': 0}
09:16:20-927052 INFO Model load finished: {'ram': {'used': 5.57, 'total': 63.14}, 'gpu': {'used': 5.68, 'total': 23.99}, 'retries': 0,
'oom': 0} cached=0
09:16:21-024057 INFO Applying token merging: ratio=0.5
09:16:21-372989 DEBUG Sampler: sampler="Euler a" config={'scheduler': 'karras', 'brownian_noise': False}
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 50/50 [00:03<00:00, 13.25it/s]
09:16:25-272893 DEBUG Init hires: upscaler="ESRGAN 8x_NMKD-Superscale_150000_G" sampler="Euler a" resize=0x0 upscale=1024x1024
09:16:26-095216 INFO Upscaler loaded: type=ESRGAN model=D:\SD\models\ESRGAN\8x_NMKD-Superscale_150000_G.pth
Upscaling ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 0:00:01
09:16:27-552219 DEBUG Upscaler unloaded: type=ESRGAN model=D:\SD\models\ESRGAN\8x_NMKD-Superscale_150000_G.pth
09:16:27-849257 DEBUG gc: collected=459 device=cuda {'ram': {'used': 2.09, 'total': 63.14}, 'gpu': {'used': 5.81, 'total': 23.99},
'retries': 0, 'oom': 0}
09:16:28-672454 DEBUG Sampler: sampler="Euler a" config={'scheduler': 'karras', 'brownian_noise': False}
09:16:28-678954 INFO Applying token merging: ratio=0.4
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 50/50 [00:14<00:00, 3.37it/s]
09:16:43-537885 INFO Applying token merging: ratio=0.5
09:16:45-549515 INFO Processed: images=1 time=24.52 its=2.04 memory={'ram': {'used': 2.11, 'total': 63.14}, 'gpu': {'used': 6.26,
'total': 23.99}, 'retries': 0, 'oom': 0}
09:16:45-815541 DEBUG Saving temp: image="D:\Temp\gradio\tmpnrx0g64w.png"
Operations: none
):fast car
Negative prompt: bw
Steps: 50, Seed: 3933460404, Sampler: Euler a, CFG scale: 6, Size: 512x512, Parser: Full parser, Model: aZovyaRPGArtistTools_v3VAE-pruned, Model hash: 2b399373bc, Backend: Original, App: SD.Next, Version: eda2aa6, Comment: , Operations: none, Sampler discard: False, Sampler sigma: karras, ToMe: 0.5, ToMe hires: 0.4
Operations: hires; txt2img
. Maybe the mixed up order of hires
and txt2img
causes a problem and it's not saving properly because of that? Full output below the image:Prompt: fast car
Negative prompt: bw
Steps: 50 | Seed: 3933460404 | Sampler: Euler a | CFG scale: 6 | Size: 512x512 | Parser: Full parser | Model: aZovyaRPGArtistTools_v3VAE-pruned | Model hash: 2b399373bc | Backend: Original | App: SD.Next | Version: eda2aa6 | Operations: hires; txt2img | Second pass: True | Hires force: True | Hires steps: 50 | Hires upscaler: ESRGAN 8x_NMKD-Superscale_150000_G | Hires upscale: 2 | Hires resize: 0x0 | Hires size: 1024x1024 | Denoising strength: 0.55 | Latent sampler: Euler a | Image CFG scale: 6 | CFG rescale: 0.7 | Sampler discard: False | Sampler sigma: karras | ToMe: 0.5 | ToMe hires: 0.4
ah, that's different. issue is that params.txt
is saved at the start of the generate, before image is even generated and it does not contain all metadata. actual image does contain correct metadata. and that is how legacy a1111 handled params.txt
.
i've just moved logic so params.txt
is not saved before process, but together with actual image save.
a lot of work has gone in this area of the code since this issue has been created and i believe all listed items have been addressed. if there are remaining items, best to start with a fresh issue due to long history here.
Issue Description
Version Platform Description
Relevant log output
No response
Backend
Original
Model
SD 1.5
Acknowledgements