Compare commits

...

5 Commits

Author SHA1 Message Date
Drift Johnson
180ba6dff0
Merge fb5c22292e6302678f140f67e25f05d83dc33902 into fdb8abd2790b5459ddc7066c31861bb0b62e988b 2025-09-08 03:35:38 +00:00
Jukka Seppänen
fdb8abd279
Merge pull request #391 from huixingyun/main
Update minimal diffusers version
2025-08-07 14:03:37 +03:00
sko00o
881bbbf6c9
Added validation for max_size parameter in get_3d_rotary_pos_embed function when grid_type is set to 'slice'. 2025-07-31 15:01:48 +08:00
sko00o
389fb0323f
update diffusers>=0.33.1 2025-07-31 14:59:28 +08:00
Tom
fb5c22292e
added batch files for comfyUI portable users
install-portable.bat - installs the requirements.txt for ComfyUI portable users (embedded python)

setup-onediff.bat - installs the recommended extras for ComfyUI Portable users (embedded python)

It can be easy to install to system python by accident when running the the Portable version of ComfyUI, so i use these to help make life easier.
2024-09-08 19:35:02 +01:00
4 changed files with 36 additions and 2 deletions

View File

@ -67,8 +67,9 @@ class CogVideoXPatchEmbed(nn.Module):
post_time_compression_frames,
self.spatial_interpolation_scale,
self.temporal_interpolation_scale,
output_type="pt",
)
pos_embedding = torch.from_numpy(pos_embedding).flatten(0, 1)
pos_embedding = pos_embedding.flatten(0, 1)
joint_pos_embedding = torch.zeros(
1, self.max_text_seq_length + num_patches, self.embed_dim, requires_grad=False
)
@ -173,6 +174,8 @@ def get_3d_rotary_pos_embed(
grid_t = np.arange(temporal_size, dtype=np.float32)
grid_t = np.linspace(0, temporal_size, temporal_size, endpoint=False, dtype=np.float32)
elif grid_type == "slice":
if max_size is None:
raise ValueError("`max_size` must be provided when `grid_type` is 'slice'")
max_h, max_w = max_size
grid_size_h, grid_size_w = grid_size
grid_h = np.arange(max_h, dtype=np.float32)

16
install-portable.bat Normal file
View File

@ -0,0 +1,16 @@
@echo off
set "requirements_txt=%~dp0\requirements.txt"
set "python_exec=..\..\..\python_embeded\python.exe"
echo Installing node...
if exist "%python_exec%" (
echo Installing with ComfyUI Portable
"%python_exec%" -s -m pip install -r "%requirements_txt%"
) else (
echo Installing with system Python
pip install -r "%requirements_txt%"
)
pause

View File

@ -1,5 +1,5 @@
huggingface_hub
diffusers>=0.31.0
diffusers>=0.33.1
accelerate>=0.33.0
einops
peft

15
setup-onediff.bat Normal file
View File

@ -0,0 +1,15 @@
@echo off
set "python_exec=..\..\..\python_embeded\python.exe"
echo Installing node...
if exist "%python_exec%" (
echo Installing with ComfyUI Portable
"%python_exec%" -s -m pip install --pre onediff onediffx && pip install nexfort"
) else (
echo Installing with system Python
pip install --pre onediff onediffx && pip install nexfort"
)
pause