Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2026-01-12 17:12:13 +01:00
parent 280da2c10b
commit 5e4ed9c9bb
3 changed files with 12 additions and 2 deletions
+4 -1
View File
@@ -137,8 +137,11 @@ def run_ltx(task_id,
"num_inference_steps": steps,
"generator": get_generator(seed),
"callback_on_step_end": diffusers_callback,
"output_type": "latent",
}
if 'LTX2' in shared.sd_model.__class__.__name__:
base_args["output_type"] = "np"
else:
base_args["output_type"] = "latent"
if 'Condition' in shared.sd_model.__class__.__name__:
base_args["image_cond_noise_scale"] = image_cond_noise_scale
shared.log.debug(f'Video: cls={shared.sd_model.__class__.__name__} op=base {base_args}')
+6 -1
View File
@@ -31,7 +31,7 @@ processed = None # last known processed results
class Processed:
def __init__(self, p: StableDiffusionProcessing, images_list, seed=-1, info=None, subseed=None, all_prompts=None, all_negative_prompts=None, all_seeds=None, all_subseeds=None, index_of_first_image=0, infotexts=None, comments="", binary=None):
def __init__(self, p: StableDiffusionProcessing, images_list, seed=-1, info=None, subseed=None, all_prompts=None, all_negative_prompts=None, all_seeds=None, all_subseeds=None, index_of_first_image=0, infotexts=None, comments="", binary=None, audio=None):
self.sd_model_hash = getattr(shared.sd_model, 'sd_model_hash', '') if model_data.sd_model is not None else ''
self.prompt = p.prompt or ''
@@ -53,6 +53,8 @@ class Processed:
self.batch_size = max(1, p.batch_size)
self.denoising_strength = p.denoising_strength
self.audio = audio
self.restore_faces = p.restore_faces or False
self.face_restoration_model = shared.opts.face_restoration_model if p.restore_faces else None
self.detailer = p.detailer_enabled or False
@@ -484,6 +486,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
output_images.append(batch_image)
infotexts.append(batch_infotext)
audio = getattr(samples, 'audio', None)
if shared.cmd_opts.lowvram:
devices.torch_gc(force=True, reason='lowvram')
timer.process.record('post')
@@ -522,6 +526,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
subseed=p.all_subseeds[0],
index_of_first_image=index_of_first_image,
infotexts=infotexts,
audio=audio,
)
if p.scripts is not None and isinstance(p.scripts, scripts_manager.ScriptRunner) and not (shared.state.interrupted or shared.state.skipped):
p.scripts.postprocess(p, results)
+2
View File
@@ -20,11 +20,13 @@ def set_vae_params(p):
shared.sd_model.vae.use_framewise_decoding = True
if hasattr(shared.sd_model.vae, 'enable_tiling'):
shared.sd_model.vae.enable_tiling()
debug(f'VAE params: type={vae_type} tiling=True frames={p.frames} tile_frames={p.vae_tile_frames} framewise={getattr(shared.sd_model.vae, "use_framewise_decoding", None)}')
else:
if hasattr(shared.sd_model.vae, 'use_framewise_decoding'):
shared.sd_model.vae.use_framewise_decoding = False
if hasattr(shared.sd_model.vae, 'disable_tiling'):
shared.sd_model.vae.disable_tiling()
debug(f'VAE params: type={vae_type} tiling=False frames={p.frames} tile_frames={p.vae_tile_frames} framewise={getattr(shared.sd_model.vae, "use_framewise_decoding", None)}')
def vae_decode_tiny(latents):