From 178f3b2fdce58e0b216951175f62134d71d919dd Mon Sep 17 00:00:00 2001 From: deepbeepmeep Date: Sun, 24 Aug 2025 20:12:38 +0200 Subject: [PATCH] fix prompt enhancer with image refs --- README.md | 3 ++- wgp.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc71403..da8e6cd 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models ### August 24 2025: WanGP v8.1 - the RAM Liberator - Reserved RAM entirely freed when switching models, you should get much less out of memory related to RAM. I have also added a button in *Configuration / Performance* that will release most of the RAM used by WanGP if you want to use another application without quitting WanGP -- InfiniteTalk support: improved version of Multitalk that supposedly supports very long video generations based on an audio track. Exists in two flavors (*Single Speaker* and *Multi Speakers*) but doesnt seem to be compatible with Vace. One key new feature compared to Multitalk is that you can have different visual shots associated to the same audio: each Reference frame you provide you will be associated to a new Sliding Window. If only Reference frame is provided, it will be used for all windows. When Continuing a video, you can either continue the current shot (no Reference Frame) or add new shots (one or more Reference Frames). +- InfiniteTalk support: improved version of Multitalk that supposedly supports very long video generations based on an audio track. Exists in two flavors (*Single Speaker* and *Multi Speakers*) but doesnt seem to be compatible with Vace. One key new feature compared to Multitalk is that you can have different visual shots associated to the same audio: each Reference frame you provide you will be associated to a new Sliding Window. If only Reference frame is provided, it will be used for all windows. When Continuing a video, you can either continue the current shot (no Reference Frame) or add new shots (one or more Reference Frames).\ +If you are not into audio, you can use still this model to generate infinite long image2video, just select "no speaker". Last but not least, Infinitetalk works works with all the Loras accelerators. - Flux Chroma 1 HD support: uncensored flux based model and lighter than Flux (8.9B versus 12B) and can fit entirely in VRAM with only 16 GB of VRAM. Unfortunalely it is not distilled and you will need CFG at minimum 20 steps ### August 21 2025: WanGP v8.01 - the killer of seven diff --git a/wgp.py b/wgp.py index 37b4074..4c742e1 100644 --- a/wgp.py +++ b/wgp.py @@ -4173,16 +4173,19 @@ def enhance_prompt(state, prompt, prompt_enhancer, multi_images_gen_type, overri enhancer_offloadobj = offload.profile(pipe, profile_no= profile, **kwargs) original_image_refs = inputs["image_refs"] + if original_image_refs is not None: + original_image_refs = [ convert_image(tup[0]) for tup in original_image_refs ] is_image = inputs["image_mode"] == 1 seed = inputs["seed"] seed = set_seed(seed) enhanced_prompts = [] for i, (one_prompt, one_image) in enumerate(zip(original_prompts, image_start)): + start_images = [one_image] if one_image is not None else None status = f'Please Wait While Enhancing Prompt' if num_prompts==1 else f'Please Wait While Enhancing Prompt #{i+1}' progress((i , num_prompts), desc=status, total= num_prompts) try: - enhanced_prompt = process_prompt_enhancer(prompt_enhancer, [one_prompt], [one_image], original_image_refs, is_image, seed ) + enhanced_prompt = process_prompt_enhancer(prompt_enhancer, [one_prompt], start_images, original_image_refs, is_image, seed ) except Exception as e: enhancer_offloadobj.unload_all() with gen_lock: