mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
Fix ruff.
This commit is contained in:
parent
4dc8dad3bd
commit
022c307f38
@ -6,6 +6,7 @@ from typing import Optional
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from .pixel_norm import PixelNorm
|
from .pixel_norm import PixelNorm
|
||||||
import comfy.ops
|
import comfy.ops
|
||||||
|
import logging
|
||||||
|
|
||||||
ops = comfy.ops.disable_weight_init
|
ops = comfy.ops.disable_weight_init
|
||||||
|
|
||||||
@ -400,9 +401,9 @@ def make_attn(in_channels, attn_type="vanilla", norm_type="group"):
|
|||||||
attn_type = AttentionType.str_to_enum(attn_type)
|
attn_type = AttentionType.str_to_enum(attn_type)
|
||||||
|
|
||||||
if attn_type != AttentionType.NONE:
|
if attn_type != AttentionType.NONE:
|
||||||
print(f"making attention of type '{attn_type.value}' with {in_channels} in_channels")
|
logging.info(f"making attention of type '{attn_type.value}' with {in_channels} in_channels")
|
||||||
else:
|
else:
|
||||||
print(f"making identity attention with {in_channels} in_channels")
|
logging.info(f"making identity attention with {in_channels} in_channels")
|
||||||
|
|
||||||
match attn_type:
|
match attn_type:
|
||||||
case AttentionType.VANILLA:
|
case AttentionType.VANILLA:
|
||||||
|
|||||||
@ -113,7 +113,7 @@ class LTXAVTEModel(torch.nn.Module):
|
|||||||
sdo = comfy.utils.state_dict_prefix_replace(sd, {"text_embedding_projection.aggregate_embed.weight": "text_embedding_projection.weight", "model.diffusion_model.video_embeddings_connector.": "video_embeddings_connector.", "model.diffusion_model.audio_embeddings_connector.": "audio_embeddings_connector."}, filter_keys=True)
|
sdo = comfy.utils.state_dict_prefix_replace(sd, {"text_embedding_projection.aggregate_embed.weight": "text_embedding_projection.weight", "model.diffusion_model.video_embeddings_connector.": "video_embeddings_connector.", "model.diffusion_model.audio_embeddings_connector.": "audio_embeddings_connector."}, filter_keys=True)
|
||||||
if len(sdo) == 0:
|
if len(sdo) == 0:
|
||||||
sdo = sd
|
sdo = sd
|
||||||
print(sdo.keys())
|
|
||||||
return self.load_state_dict(sdo, strict=False)
|
return self.load_state_dict(sdo, strict=False)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ name = "ComfyUI"
|
|||||||
version = "0.7.0"
|
version = "0.7.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.10"
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
homepage = "https://www.comfy.org/"
|
homepage = "https://www.comfy.org/"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user