fix detailer metadata

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-09-08 10:19:14 -04:00
parent d673c58c10
commit 2b26a3a21a
9 changed files with 17 additions and 7 deletions
+4 -3
View File
@@ -1,8 +1,8 @@
# Change Log for SD.Next
## Update for 2025-09-07
## Update for 2025-09-08
### Highlights for 2025-09-07
### Highlights for 2025-09-08
*What's new*? Big one is that we're (finally) switching the default UI to **ModernUI**!
StandardUI is still available and can be selected in settings, but ModernUI is now the default for new installs
@@ -11,7 +11,7 @@ Also, there are quite a few offloading improvements and many quality-of-life cha
[ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867)
### Details for 2025-09-07
### Details for 2025-09-08
- **Models**
- **Chroma** final versions: [Chroma1-HD](https://huggingface.co/lodestones/Chroma1-HD), [Chroma1-Base](https://huggingface.co/lodestones/Chroma1-Base) and [Chroma1-Flash](https://huggingface.co/lodestones/Chroma1-Flash)
@@ -100,6 +100,7 @@ Also, there are quite a few offloading improvements and many quality-of-life cha
- fix `wan a14b` quantization
- fix reprocess workflow for control with hires
- fix samplers set timesteps vs sigmas
- fix `detailer` missing metadata
## Update for 2025-08-20
+1 -1
View File
@@ -603,7 +603,7 @@ def check_diffusers():
if args.skip_git:
install('diffusers')
return
sha = '764b62473ac10afd9c52e6b3f3f528f719bc7a34' # diffusers commit hash
sha = 'f50b18eec7d646bf98aef576dbb0f47ff512beaa' # diffusers commit hash
pkg = pkg_resources.working_set.by_key.get('diffusers', None)
minor = int(pkg.version.split('.')[1] if pkg is not None else -1)
cur = opts.get('diffusers_version', '') if minor > -1 else ''
+1 -1
View File
@@ -620,7 +620,7 @@ def control_run(state: str = '', # pylint: disable=keyword-arg-before-vararg
image_txt = ''
p.init_images = output_images # may be used for hires
if video_type != 'None' and isinstance(output_images, list):
if video_type != 'None' and isinstance(output_images, list) and 'video' in p.ops:
p.do_not_save_grid = True # pylint: disable=attribute-defined-outside-init
output_filename = images.save_video(p, filename=None, images=output_images, video_type=video_type, duration=video_duration, loop=video_loop, pad=video_pad, interpolate=video_interpolate, sync=True)
if shared.opts.gradio_skip_video:
+1
View File
@@ -78,6 +78,7 @@ def framepack_post(request: ReqFramepack):
shared.log.trace(f"API FramePack: id={task_id} init={init_image.shape} end={end_image.shape if end_image else None} {request}")
generator = run_framepack(
_ui_state=None,
task_id=f'task({task_id})',
variant=request.variant,
init_image=init_image,
+1
View File
@@ -164,6 +164,7 @@ def run_framepack(task_id, _ui_state, init_image, end_image, start_weight, end_w
width=w,
height=h,
)
p.ops.append('video')
prompts = prepare_prompts(p, init_image, prompt, section_prompt, num_sections, vlm_enhance, vlm_model, vlm_system_prompt)
async_run(
+1
View File
@@ -63,6 +63,7 @@ def parse(infotext):
return params
params['Prompt'] = prompt
params['Negative prompt'] = negative
debug(f'Params: {params}')
for key, val in params.copy().items():
val = unquote(val).strip(" ,\n").replace('\\\n', '')
size = re_size.match(val)
+1
View File
@@ -89,6 +89,7 @@ def run_ltx(task_id,
sampler_index=sampler_index,
seed=seed,
)
p.ops.append('video')
conditions = get_conditions(
width,
+6 -1
View File
@@ -275,7 +275,6 @@ def process_samples(p: StableDiffusionProcessing, samples):
for i, sample in enumerate(samples):
debug(f'Processing result: index={i+1}/{len(samples)}')
p.batch_index = i
info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i)
if isinstance(sample, Image.Image) or (isinstance(sample, list) and isinstance(sample[0], Image.Image)):
image = sample
sample = np.array(sample)
@@ -286,6 +285,7 @@ def process_samples(p: StableDiffusionProcessing, samples):
if p.restore_faces:
p.ops.append('restore')
if not p.do_not_save_samples and shared.opts.save_images_before_detailer:
info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i)
images.save_image(Image.fromarray(sample), path=p.outpath_samples, basename="", seed=p.seeds[i], prompt=p.prompts[i], extension=shared.opts.samples_format, info=info, p=p, suffix="-before-restore")
sample = face_restoration.restore_faces(sample, p)
if sample is not None:
@@ -294,6 +294,7 @@ def process_samples(p: StableDiffusionProcessing, samples):
if p.detailer_enabled:
p.ops.append('detailer')
if not p.do_not_save_samples and shared.opts.save_images_before_detailer:
info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i)
images.save_image(Image.fromarray(sample), path=p.outpath_samples, basename="", seed=p.seeds[i], prompt=p.prompts[i], extension=shared.opts.samples_format, info=info, p=p, suffix="-before-detailer")
sample = detailer.detail(sample, p)
if sample is not None:
@@ -306,6 +307,7 @@ def process_samples(p: StableDiffusionProcessing, samples):
p.color_corrections = None
p.color_corrections = orig
image_without_cc = apply_overlay(image, p.paste_to, i, p.overlay_images)
info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i)
images.save_image(image_without_cc, path=p.outpath_samples, basename="", seed=p.seeds[i], prompt=p.prompts[i], extension=shared.opts.samples_format, info=info, p=p, suffix="-before-color-correct")
image = apply_color_correction(p.color_corrections[i], image)
@@ -324,6 +326,7 @@ def process_samples(p: StableDiffusionProcessing, samples):
image2 = Image.new('RGBa', image.size)
mask = images.resize_image(3, p.mask_for_overlay, image.width, image.height).convert('L')
image_mask_composite = Image.composite(image1, image2, mask).convert('RGBA')
info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i)
if shared.opts.save_mask:
images.save_image(image_mask, p.outpath_samples, "", p.seeds[i], p.prompts[i], shared.opts.samples_format, info=info, p=p, suffix="-mask")
if shared.opts.save_mask_composite:
@@ -336,6 +339,7 @@ def process_samples(p: StableDiffusionProcessing, samples):
out_images.append(image_mask_composite)
if shared.opts.include_mask:
info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i)
if shared.opts.mask_apply_overlay and p.overlay_images is not None and len(p.overlay_images) > 0:
p.image_mask = create_binary_mask(p.overlay_images[0])
p.image_mask = ImageOps.invert(p.image_mask)
@@ -354,6 +358,7 @@ def process_samples(p: StableDiffusionProcessing, samples):
if p.resize_mode_after != 0 and p.resize_name_after != 'None':
image = images.resize_image(p.resize_mode_after, image, p.width_after, p.height_after, p.resize_name_after, context=p.resize_context_after)
info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i)
if shared.opts.samples_save and not p.do_not_save_samples and p.outpath_samples is not None:
images.save_image(image, p.outpath_samples, "", p.seeds[i], p.prompts[i], shared.opts.samples_format, info=info, p=p) # main save image
+1 -1
View File
@@ -697,7 +697,7 @@ def create_ui(_blocks: gr.Blocks=None):
# refiner
(refiner_start, "Refiner start"),
(refiner_steps, "Refiner steps"),
(refiner_prompt, "refiner prompt"),
(refiner_prompt, "Refiner prompt"),
(refiner_negative, "Refiner negative"),
# pag
(pag_scale, "PAG scale"),