Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
from .comfyui.comfyui_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS

__version__ = "1.0.1"

__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]


def get_version():
"""Return the VideoX-Fun version."""
return __version__
4 changes: 2 additions & 2 deletions comfyui/flux2/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,10 @@ def convert_mistral3_to_diffusers(state_dict):
[os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "models/Diffusion_Transformer")] # Possible folder names to check
try:
tokenizer_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="flux2_tokenizer")
except:
except Exception:
try:
tokenizer_path = os.path.join(search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="FLUX.2-dev"), "tokenizer")
except:
except Exception:
tokenizer_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="Mistral-Nemo-Instruct-2407")

tokenizer = PixtralProcessor.from_pretrained(tokenizer_path)
Expand Down
8 changes: 4 additions & 4 deletions comfyui/qwenimage/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@ def loadmodel(self, model_name, precision,):
[os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "models/Diffusion_Transformer")] # Possible folder names to check
try:
tokenizer_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="qwen2_tokenizer")
except:
except Exception:
try:
tokenizer_path = os.path.join(search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="Qwen-Image"), "tokenizer")
except:
except Exception:
tokenizer_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="Qwen2.5-VL-7B-Instruct")

tokenizer = Qwen2Tokenizer.from_pretrained(tokenizer_path)
Expand All @@ -504,10 +504,10 @@ def loadmodel(self, ):
[os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "models/Diffusion_Transformer")] # Possible folder names to check
try:
processor_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="qwen2_processor")
except:
except Exception:
try:
processor_path = os.path.join(search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="Qwen-Image-Edit"), "processor")
except:
except Exception:
processor_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="Qwen2.5-VL-7B-Instruct")

# Get processor
Expand Down
4 changes: 2 additions & 2 deletions comfyui/z_image/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,10 @@ def loadmodel(self, model_name, precision,):
[os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "models/Diffusion_Transformer")] # Possible folder names to check
try:
tokenizer_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="qwen3_tokenizer")
except:
except Exception:
try:
tokenizer_path = os.path.join(search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="Z-Image-Turbo"), "tokenizer")
except:
except Exception:
tokenizer_path = search_sub_dir_in_possible_folders(possible_folders, sub_dir_name="Qwen3-4B")

tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cogvideox_fun/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cogvideox_fun/train_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cogvideox_fun/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cogvideox_fun/train_reward_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ def save_model_hook(models, weights, output_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/fantasytalking/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/flux/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/flux/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/flux2/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/flux2/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/flux2_fun/train_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/flux2_fun/train_control_distill.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/hunyuanvideo/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/hunyuanvideo/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/longcatvideo/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/longcatvideo/train_avatar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/longcatvideo/train_avatar_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/longcatvideo/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/qwenimage/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/qwenimage/train_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/qwenimage/train_edit_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/qwenimage/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/qwenimage_fun/train_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/qwenimage_instantx/train_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/turbodiffusion/train_distill.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1/train_distill.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1/train_distill_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1/train_reward_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ def save_model_hook(models, weights, output_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1_fun/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1_fun/train_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1_fun/train_control_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1_fun/train_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1_fun/train_reward_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ def save_model_hook(models, weights, output_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.1_vace/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.2/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wan2.2/train_animate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except Exception:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
Loading