mirror of
				https://github.com/Wan-Video/Wan2.1.git
				synced 2025-11-04 06:15:17 +00:00 
			
		
		
		
	fixed missing audio input for Hunyuan Avatar and Custom Audio
This commit is contained in:
		
							parent
							
								
									b44fcc21df
								
							
						
					
					
						commit
						654bb0483b
					
				@ -173,8 +173,14 @@ class family_handler():
 | 
				
			|||||||
                    video_prompt_type = video_prompt_type.replace("M","")
 | 
					                    video_prompt_type = video_prompt_type.replace("M","")
 | 
				
			||||||
                    ui_defaults["video_prompt_type"] = video_prompt_type  
 | 
					                    ui_defaults["video_prompt_type"] = video_prompt_type  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if settings_version < 2.36:
 | 
				
			||||||
 | 
					            if base_model_type in ["hunyuan_avatar", "hunyuan_custom_audio"]:
 | 
				
			||||||
 | 
					                audio_prompt_type=  ui_defaults["audio_prompt_type"]
 | 
				
			||||||
 | 
					                if "A" not in audio_prompt_type:
 | 
				
			||||||
 | 
					                    audio_prompt_type += "A"
 | 
				
			||||||
 | 
					                    ui_defaults["audio_prompt_type"] = audio_prompt_type  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        pass
 | 
					 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def update_default_settings(base_model_type, model_def, ui_defaults):
 | 
					    def update_default_settings(base_model_type, model_def, ui_defaults):
 | 
				
			||||||
@ -197,6 +203,7 @@ class family_handler():
 | 
				
			|||||||
                "guidance_scale": 7.5,
 | 
					                "guidance_scale": 7.5,
 | 
				
			||||||
                "flow_shift": 13,
 | 
					                "flow_shift": 13,
 | 
				
			||||||
                "video_prompt_type": "I",
 | 
					                "video_prompt_type": "I",
 | 
				
			||||||
 | 
					                "audio_prompt_type": "A",
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        elif base_model_type in ["hunyuan_custom_edit"]:
 | 
					        elif base_model_type in ["hunyuan_custom_edit"]:
 | 
				
			||||||
            ui_defaults.update({
 | 
					            ui_defaults.update({
 | 
				
			||||||
@ -213,4 +220,5 @@ class family_handler():
 | 
				
			|||||||
                "skip_steps_start_step_perc": 25, 
 | 
					                "skip_steps_start_step_perc": 25, 
 | 
				
			||||||
                "video_length": 129,
 | 
					                "video_length": 129,
 | 
				
			||||||
                "video_prompt_type": "KI",
 | 
					                "video_prompt_type": "KI",
 | 
				
			||||||
 | 
					                "audio_prompt_type": "A",
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								wgp.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								wgp.py
									
									
									
									
									
								
							@ -64,7 +64,7 @@ PROMPT_VARS_MAX = 10
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
target_mmgp_version = "3.6.0"
 | 
					target_mmgp_version = "3.6.0"
 | 
				
			||||||
WanGP_version = "8.72"
 | 
					WanGP_version = "8.72"
 | 
				
			||||||
settings_version = 2.35
 | 
					settings_version = 2.36
 | 
				
			||||||
max_source_video_frames = 3000
 | 
					max_source_video_frames = 3000
 | 
				
			||||||
prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None
 | 
					prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user