mirror of
https://git.datalinker.icu/kijai/ComfyUI-CogVideoXWrapper.git
synced 2025-12-09 12:54:22 +08:00
Compare commits
5 Commits
23193a4f5a
...
180ba6dff0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
180ba6dff0 | ||
|
|
fdb8abd279 | ||
|
|
881bbbf6c9 | ||
|
|
389fb0323f | ||
|
|
fb5c22292e |
@ -67,8 +67,9 @@ class CogVideoXPatchEmbed(nn.Module):
|
|||||||
post_time_compression_frames,
|
post_time_compression_frames,
|
||||||
self.spatial_interpolation_scale,
|
self.spatial_interpolation_scale,
|
||||||
self.temporal_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(
|
joint_pos_embedding = torch.zeros(
|
||||||
1, self.max_text_seq_length + num_patches, self.embed_dim, requires_grad=False
|
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.arange(temporal_size, dtype=np.float32)
|
||||||
grid_t = np.linspace(0, temporal_size, temporal_size, endpoint=False, dtype=np.float32)
|
grid_t = np.linspace(0, temporal_size, temporal_size, endpoint=False, dtype=np.float32)
|
||||||
elif grid_type == "slice":
|
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
|
max_h, max_w = max_size
|
||||||
grid_size_h, grid_size_w = grid_size
|
grid_size_h, grid_size_w = grid_size
|
||||||
grid_h = np.arange(max_h, dtype=np.float32)
|
grid_h = np.arange(max_h, dtype=np.float32)
|
||||||
|
|||||||
16
install-portable.bat
Normal file
16
install-portable.bat
Normal 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
|
||||||
@ -1,5 +1,5 @@
|
|||||||
huggingface_hub
|
huggingface_hub
|
||||||
diffusers>=0.31.0
|
diffusers>=0.33.1
|
||||||
accelerate>=0.33.0
|
accelerate>=0.33.0
|
||||||
einops
|
einops
|
||||||
peft
|
peft
|
||||||
|
|||||||
15
setup-onediff.bat
Normal file
15
setup-onediff.bat
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user