mirror of
				https://github.com/Wan-Video/Wan2.1.git
				synced 2025-11-04 06:15:17 +00:00 
			
		
		
		
	fixed ref image in phantom missing
This commit is contained in:
		
							parent
							
								
									1df89e649f
								
							
						
					
					
						commit
						c4b8c6b81b
					
				
							
								
								
									
										9
									
								
								wgp.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								wgp.py
									
									
									
									
									
								
							@ -1814,6 +1814,7 @@ def get_default_settings(model_type):
 | 
				
			|||||||
                    "guidance_scale": 7.5,
 | 
					                    "guidance_scale": 7.5,
 | 
				
			||||||
                    "flow_shift": 5,
 | 
					                    "flow_shift": 5,
 | 
				
			||||||
                    "remove_background_images_ref": 0,
 | 
					                    "remove_background_images_ref": 0,
 | 
				
			||||||
 | 
					                    "video_prompt_type": "I",
 | 
				
			||||||
                    # "resolution": "1280x720" 
 | 
					                    # "resolution": "1280x720" 
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1824,6 +1825,12 @@ def get_default_settings(model_type):
 | 
				
			|||||||
                    "resolution": "1280x720",
 | 
					                    "resolution": "1280x720",
 | 
				
			||||||
                    "video_prompt_type": "I",
 | 
					                    "video_prompt_type": "I",
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
 | 
					            elif model_type in ("hunyuan_custom_audio"):
 | 
				
			||||||
 | 
					                ui_defaults.update({
 | 
				
			||||||
 | 
					                    "guidance_scale": 7.5,
 | 
				
			||||||
 | 
					                    "flow_shift": 13,
 | 
				
			||||||
 | 
					                    "video_prompt_type": "I",
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
            elif model_type in ("hunyuan_custom_edit"):
 | 
					            elif model_type in ("hunyuan_custom_edit"):
 | 
				
			||||||
                ui_defaults.update({
 | 
					                ui_defaults.update({
 | 
				
			||||||
                    "guidance_scale": 7.5,
 | 
					                    "guidance_scale": 7.5,
 | 
				
			||||||
@ -5287,6 +5294,8 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                mask_expand = gr.Slider(-10, 50, value=ui_defaults.get("mask_expand", 0), step=1, label="Expand / Shrink Mask Area", visible= "A" in video_prompt_type_value and not "U" in video_prompt_type_value )
 | 
					                mask_expand = gr.Slider(-10, 50, value=ui_defaults.get("mask_expand", 0), step=1, label="Expand / Shrink Mask Area", visible= "A" in video_prompt_type_value and not "U" in video_prompt_type_value )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (phantom or hunyuan_video_custom) and not "I" in video_prompt_type_value: video_prompt_type_value += "I"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                image_refs = gr.Gallery( label ="Start Image" if hunyuan_video_avatar else "Reference Images",
 | 
					                image_refs = gr.Gallery( label ="Start Image" if hunyuan_video_avatar else "Reference Images",
 | 
				
			||||||
                        type ="pil",   show_label= True,
 | 
					                        type ="pil",   show_label= True,
 | 
				
			||||||
                        columns=[3], rows=[1], object_fit="contain", height="auto", selected_index=0, interactive= True, visible= "I" in video_prompt_type_value, 
 | 
					                        columns=[3], rows=[1], object_fit="contain", height="auto", selected_index=0, interactive= True, visible= "I" in video_prompt_type_value, 
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user