fix prompt enhancer with image refs

This commit is contained in:
deepbeepmeep 2025-08-24 20:12:38 +02:00
parent e2273ef726
commit 178f3b2fdc
2 changed files with 6 additions and 2 deletions

View File

@ -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

5
wgp.py
View File

@ -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: