mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-04 07:52:46 +08:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
8e69e2ddfd | ||
|
0270a0b41c |
@@ -18,7 +18,7 @@ def sinusoidal_embedding_1d(dim, position):
|
|||||||
# preprocess
|
# preprocess
|
||||||
assert dim % 2 == 0
|
assert dim % 2 == 0
|
||||||
half = dim // 2
|
half = dim // 2
|
||||||
position = position.type(torch.float64)
|
position = position.type(torch.float32)
|
||||||
|
|
||||||
# calculation
|
# calculation
|
||||||
sinusoid = torch.outer(
|
sinusoid = torch.outer(
|
||||||
@@ -353,7 +353,7 @@ class WanModel(torch.nn.Module):
|
|||||||
|
|
||||||
# embeddings
|
# embeddings
|
||||||
self.patch_embedding = operations.Conv3d(
|
self.patch_embedding = operations.Conv3d(
|
||||||
in_dim, dim, kernel_size=patch_size, stride=patch_size, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))
|
in_dim, dim, kernel_size=patch_size, stride=patch_size, device=operation_settings.get("device"), dtype=torch.float32)
|
||||||
self.text_embedding = nn.Sequential(
|
self.text_embedding = nn.Sequential(
|
||||||
operations.Linear(text_dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), nn.GELU(approximate='tanh'),
|
operations.Linear(text_dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), nn.GELU(approximate='tanh'),
|
||||||
operations.Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")))
|
operations.Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")))
|
||||||
@@ -411,7 +411,7 @@ class WanModel(torch.nn.Module):
|
|||||||
List of denoised video tensors with original input shapes [C_out, F, H / 8, W / 8]
|
List of denoised video tensors with original input shapes [C_out, F, H / 8, W / 8]
|
||||||
"""
|
"""
|
||||||
# embeddings
|
# embeddings
|
||||||
x = self.patch_embedding(x)
|
x = self.patch_embedding(x.float()).to(x.dtype)
|
||||||
grid_sizes = x.shape[2:]
|
grid_sizes = x.shape[2:]
|
||||||
x = x.flatten(2).transpose(1, 2)
|
x = x.flatten(2).transpose(1, 2)
|
||||||
|
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
# This file is automatically generated by the build process when version is
|
# This file is automatically generated by the build process when version is
|
||||||
# updated in pyproject.toml.
|
# updated in pyproject.toml.
|
||||||
__version__ = "0.3.16"
|
__version__ = "0.3.17"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "ComfyUI"
|
name = "ComfyUI"
|
||||||
version = "0.3.16"
|
version = "0.3.17"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
|
Reference in New Issue
Block a user