fix grid with lora, add dlss framgen logging, add 8bit minimax variants

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-09-14 11:34:34 +02:00
parent 129db5b49a
commit cb7bc0faca
9 changed files with 59 additions and 12 deletions
+5 -2
View File
@@ -93,8 +93,7 @@ class DLSSFrameGen:
capabilities = probe_frame_interpolation_capabilities(options.ai_gpu_uuid)
log.debug(f'DLSSFrameGen: capabilities={capabilities}')
if not capabilities.available:
raise StandaloneError("feature_unavailable", "FrameGen: unavailable. " + capabilities.detail,
)
raise StandaloneError("feature_unavailable", "FrameGen: unavailable. " + capabilities.detail)
plan = choose_interpolation_plan(
source_rate,
target_rate,
@@ -102,6 +101,7 @@ class DLSSFrameGen:
capabilities.native_multiplier,
cfr=True,
)
log.debug(f'DLSSFrameGen: plan={plan}')
source_frames = [
_TimedFrame(rgb_to_rgba(nchw_image_to_hwc(frames, index, name="frames")), Fraction(index, 1) / source_rate)
for index in range(batch)
@@ -146,6 +146,7 @@ class DLSSFrameGen:
ideal = Fraction(index, 1) / target_rate
selected = min(frames, key=lambda frame, target=ideal: abs(frame.timestamp - target))
result.append(_TimedFrame(selected.rgba.copy(), ideal))
log.debug(f'DLSSFrameGen: input={len(frames)} resampled={len(result)}')
return result
@staticmethod
@@ -155,6 +156,7 @@ class DLSSFrameGen:
try:
stage_count = plan.cascade_stages or 1
for stage_index in range(stage_count):
log.debug(f'DirectDLSSGSession: index={stage_index + 1} count={stage_count} stage create')
generated_count = (
plan.generated_per_interval
if plan.path == "Native DLSSG"
@@ -195,6 +197,7 @@ class DLSSFrameGen:
return result
finally:
for session in reversed(sessions):
log.debug(f'DirectDLSSGSession: session={session} close')
try:
session.close()
except (OSError, RuntimeError, ValueError):
+9 -7
View File
@@ -62,10 +62,10 @@ def create_ui(parent):
with gr.Row():
fg_enabled = gr.Checkbox(label='FG enable', value=False, elem_id='dlss_fg_enabled')
with gr.Row():
fg_source_fps = gr.Dropdown(label='Source FPS', choices=FPS_CHOICES, value='23.976', elem_id='dlss_fg_source_fps')
fg_target_fps = gr.Dropdown(label='Target FPS', choices=FPS_CHOICES, value='60', elem_id='dlss_fg_target_fps')
fg_source_fps = gr.Dropdown(label='FG source FPS', choices=FPS_CHOICES, value='23.976', elem_id='dlss_fg_source_fps')
fg_target_fps = gr.Dropdown(label='FG target FPS', choices=FPS_CHOICES, value='60', elem_id='dlss_fg_target_fps')
with gr.Row():
fg_engine = gr.Dropdown(label='Engine', choices=['Auto', 'Native DLSSG', 'Cascade'], value='Auto', elem_id='dlss_fg_engine')
fg_engine = gr.Dropdown(label='FG engine', choices=['Auto', 'Native DLSSG', 'Cascade'], value='Auto', elem_id='dlss_fg_engine')
with gr.Accordion('DLSS Status', open=True, elem_id='dlss_status'):
ss_status = gr.JSON({ 'Status': 'unknown' if len(shared.opts.dlss_pkg_path) < 4 else 'stored'})
@@ -231,9 +231,10 @@ def framegen(pkg_path, images, fg_source_fps, fg_target_fps, fg_engine):
if debug:
log.trace(f'DLSS: method=FrameGen input={frames.shape} options={options}')
response = c.controller.call(
pkg_path, 'framegen',
pkg_path,
'framegen',
{ 'frames': frames, 'source_fps': fg_source_fps, 'target_fps': fg_target_fps, 'options': options },
timeout=300.0,
timeout=600.0,
)
if response.get('status') != 'ok':
error = response.get('error') or {}
@@ -333,10 +334,11 @@ def dlss(p: processing.StableDiffusionProcessing | None, pp: processing.Processe
t0 = time.time()
if p:
p.extra_generation_params["DLSSFrameGen"] = True
log.info(f'DLSS: method=FrameGen source={fg_source_fps} target={fg_target_fps} engine={fg_engine}')
log.info(f'DLSS: method=FrameGen source={fg_source_fps} target={fg_target_fps} engine="{fg_engine}"')
output = framegen(pkg_path, current_images, fg_source_fps, fg_target_fps, fg_engine)
if debug:
log.trace(f'DLSS: method=FrameGen images={len(output) if output else 0} time={time.time() - t0:.3f}')
t1 = time.time()
log.trace(f'DLSS: method=FrameGen frames={len(output) if output else 0} time={t1 - t0:.3f}')
if output:
images = output
current_images = output
+1
View File
@@ -330,6 +330,7 @@ class XYZGridScript(scripts_manager.Script):
return processing.Processed(p, [], p.seed, ""), 0
p.xyz = True
pc = copy(p)
pc.network_data = None
pc.override_settings_restore_afterwards = False
pc.styles = pc.styles[:]
x_opt.apply(pc, x, xs)
+1
View File
@@ -352,6 +352,7 @@ class XYZGridScript(scripts_manager.Script):
return processing.Processed(p, [], p.seed, ""), 0
p.xyz = True
pc = copy(p)
pc.network_data = None
pc.override_settings_restore_afterwards = False
pc.styles = pc.styles[:]
if no_fixed_seeds: