Python
fixed bugs and added Depth control for Qwen
DeepBeepMeep8b3552f9d85f
diff --git a/models/qwen/qwen_handler.py b/models/qwen/qwen_handler.pyindex 2a3c848..0505a57 100644--- a/models/qwen/qwen_handler.py+++ b/models/qwen/qwen_handler.py@@ -46,7 +46,7 @@ class family_handler():if base_model_type in ["qwen_image_edit_plus_20B"]:extra_model_def["guide_preprocessing"] = {- "selection": ["", "PV", "SV", "CV"],+ "selection": ["", "PV", "DV", "SV", "CV"],}extra_model_def["mask_preprocessing"] = {diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.pyindex bb67451..f70e376 100644--- a/models/wan/wan_handler.py+++ b/models/wan/wan_handler.py@@ -396,7 +396,7 @@ class family_handler():"visible" : False,}- if vace_class or base_model_type in ["animate"]:+ if vace_class or base_model_type in ["animate", "t2v", "t2v_2_2"] :image_prompt_types_allowed = "TVL"elif base_model_type in ["infinitetalk"]:image_prompt_types_allowed = "TSVL"diff --git a/wgp.py b/wgp.pyindex 3bc3e54..43e61ba 100644--- a/wgp.py+++ b/wgp.py@@ -2646,8 +2646,9 @@ def download_models(model_filename = None, model_type= None, module_type = Falsepreload_URLs = get_model_recursive_prop(model_type, "preload_URLs", return_list= True)for url in preload_URLs:- filename = fl.get_download_location(url.split("/")[-1])- if not os.path.isfile(filename ):+ filename = fl.locate_file(os.path.basename(url))+ if filename is None:+ filename = fl.get_download_location(os.path.basename(url))if not url.startswith("http"):raise Exception(f"File '{filename}' to preload was not found locally and no URL was provided to download it. Please add an URL in the model definition file.")try:@@ -5206,6 +5207,7 @@ def generate_video(if any_mask: save_video( src_mask2, "masks2.mp4", fps, value_range=(0, 1))if video_guide is not None:preview_frame_no = 0 if extract_guide_from_window_start or model_def.get("dont_cat_preguide", False) or sparse_video_image is not None else (guide_start_frame - window_start_frame)+ preview_frame_no = min(src_video.shape[1] -1, preview_frame_no)refresh_preview["video_guide"] = convert_tensor_to_image(src_video, preview_frame_no)if src_video2 is not None:refresh_preview["video_guide"] = [refresh_preview["video_guide"], convert_tensor_to_image(src_video2, preview_frame_no)]