mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
jumbo update: add wan22-vace, improve offloading, add offloading-using-streams, change logging-levels, refactor some default packages
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -169,6 +169,12 @@ models = {
|
||||
te_cls=transformers.T5EncoderModel,
|
||||
dit_cls=diffusers.WanTransformer3DModel,
|
||||
dit_folder=("transformer", "transformer_2")),
|
||||
Model(name='WAN 2.2 14B VACE',
|
||||
url='https://huggingface.co/Wan-AI/Wan2.2-14B-VACE-T2V-Diffusers',
|
||||
repo='linoyts/Wan2.2-VACE-Fun-14B-diffusers',
|
||||
repo_cls=diffusers.WanVACEPipeline,
|
||||
te_cls=transformers.T5EncoderModel,
|
||||
dit_cls=diffusers.WanVACETransformer3DModel),
|
||||
Model(name='WAN 2.1 1.3B T2V',
|
||||
url='https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers',
|
||||
repo='Wan-AI/Wan2.1-T2V-1.3B-Diffusers',
|
||||
@@ -204,13 +210,13 @@ models = {
|
||||
repo='Wan-AI/Wan2.1-VACE-1.3B-diffusers',
|
||||
repo_cls=diffusers.WanVACEPipeline,
|
||||
te_cls=transformers.T5EncoderModel,
|
||||
dit_cls=diffusers.WanTransformer3DModel),
|
||||
dit_cls=diffusers.WanVACETransformer3DModel),
|
||||
Model(name='WAN 2.1 VACE 14B',
|
||||
url='https://huggingface.co/Wan-AI/Wan2.1-VACE-14B-diffusers',
|
||||
repo='Wan-AI/Wan2.1-VACE-14B-diffusers',
|
||||
repo_cls=diffusers.WanVACEPipeline,
|
||||
te_cls=transformers.T5EncoderModel,
|
||||
dit_cls=diffusers.WanTransformer3DModel),
|
||||
dit_cls=diffusers.WanVACETransformer3DModel),
|
||||
],
|
||||
'SkyReels V2': [
|
||||
Model(name='None'),
|
||||
|
||||
@@ -32,19 +32,22 @@ def set_overrides(p: processing.StableDiffusionProcessingVideo, selected: Model)
|
||||
if selected.name == 'Latte 1 T2V':
|
||||
p.task_args['enable_temporal_attentions'] = True
|
||||
p.task_args['video_length'] = 16 * (max(p.frames // 16, 1))
|
||||
# SkyReels
|
||||
if 'SkyReelsV2DiffusionForcing' in cls:
|
||||
p.task_args['overlap_history'] = 17
|
||||
# LTX
|
||||
if cls == 'LTXImageToVideoPipeline' or cls == 'LTXConditionPipeline':
|
||||
p.task_args['generator'] = None
|
||||
if cls == 'LTXConditionPipeline':
|
||||
p.task_args['strength'] = p.denoising_strength
|
||||
if 'LTX' in cls:
|
||||
p.task_args['width'] = 32 * (p.width // 32)
|
||||
p.task_args['height'] = 32 * (p.height // 32)
|
||||
# WAN
|
||||
if 'Wan' in cls:
|
||||
p.task_args['width'] = 16 * (p.width // 16)
|
||||
p.task_args['height'] = 16 * (p.height // 16)
|
||||
p.frames = 4 * (max(p.frames // 4, 1)) + 1
|
||||
# LTX
|
||||
if 'LTX' in cls:
|
||||
p.task_args['width'] = 32 * (p.width // 32)
|
||||
p.task_args['height'] = 32 * (p.height // 32)
|
||||
if 'SkyReelsV2DiffusionForcing' in cls:
|
||||
p.task_args['overlap_history'] = 17
|
||||
# WAN VACE
|
||||
if 'WanVACEPipeline' in cls:
|
||||
p.task_args['reference_images'] = 1
|
||||
|
||||
@@ -53,7 +53,10 @@ def generate(*args, **kwargs):
|
||||
p.do_not_save_grid = True
|
||||
p.do_not_save_samples = not save_frames
|
||||
p.outpath_samples = shared.opts.outdir_samples or shared.opts.outdir_video
|
||||
if 'I2V' in model:
|
||||
if 'T2V' in model:
|
||||
if init_image is not None:
|
||||
shared.log.warning('Video: op=T2V init image not supported')
|
||||
elif 'I2V' in model:
|
||||
if init_image is None:
|
||||
return video_utils.queue_err('init image not set')
|
||||
p.task_args['image'] = images.resize_image(resize_mode=2, im=init_image, width=p.width, height=p.height, upscaler_name=None, output_type='pil')
|
||||
@@ -66,9 +69,10 @@ def generate(*args, **kwargs):
|
||||
p.task_args['image'] = images.resize_image(resize_mode=2, im=init_image, width=p.width, height=p.height, upscaler_name=None, output_type='pil')
|
||||
p.task_args['last_image'] = images.resize_image(resize_mode=2, im=last_image, width=p.width, height=p.height, upscaler_name=None, output_type='pil')
|
||||
shared.log.debug(f'Video: op=FLF2V init={init_image} last={last_image} resized={p.task_args["image"]}')
|
||||
elif 'T2V' in model:
|
||||
elif 'VACE' in model:
|
||||
if init_image is not None:
|
||||
shared.log.warning('Video: op=T2V init image not supported')
|
||||
p.task_args['reference_images'] = [images.resize_image(resize_mode=2, im=init_image, width=p.width, height=p.height, upscaler_name=None, output_type='pil')]
|
||||
shared.log.debug(f'Video: op=VACE reference={init_image} resized={p.task_args["reference_images"]}')
|
||||
else:
|
||||
shared.log.warning(f'Video: unknown model type "{model}"')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user