diff --git a/app/logger.py b/app/logger.py index 3d26d98fe..c81c0ff89 100644 --- a/app/logger.py +++ b/app/logger.py @@ -24,7 +24,7 @@ class LogInterceptor(io.TextIOWrapper): with self._lock: self._logs_since_flush.append(entry) - # Simple handling for cr to overwrite the last output if it isnt a full line + # Simple handling for cr to overwrite the last output if it isn't a full line # else logs just get full of progress messages if isinstance(data, str) and data.startswith("\r") and not logs[-1]["m"].endswith("\n"): logs.pop() diff --git a/comfy/cli_args.py b/comfy/cli_args.py index cc1f12482..4751caef0 100644 --- a/comfy/cli_args.py +++ b/comfy/cli_args.py @@ -136,7 +136,7 @@ parser.add_argument("--force-non-blocking", action="store_true", help="Force Com parser.add_argument("--default-hashing-function", type=str, choices=['md5', 'sha1', 'sha256', 'sha512'], default='sha256', help="Allows you to choose the hash function to use for duplicate filename / contents comparison. Default is sha256.") -parser.add_argument("--disable-smart-memory", action="store_true", help="Force ComfyUI to agressively offload to regular ram instead of keeping models in vram when it can.") +parser.add_argument("--disable-smart-memory", action="store_true", help="Force ComfyUI to aggressively offload to regular ram instead of keeping models in vram when it can.") parser.add_argument("--deterministic", action="store_true", help="Make pytorch use slower deterministic algorithms when it can. Note that this might not make images deterministic in all cases.") class PerformanceFeature(enum.Enum): diff --git a/comfy/context_windows.py b/comfy/context_windows.py index 041f380f9..26ff8f85c 100644 --- a/comfy/context_windows.py +++ b/comfy/context_windows.py @@ -133,7 +133,7 @@ class IndexListContextHandler(ContextHandlerABC): if isinstance(cond_item, torch.Tensor): # check that tensor is the expected length - x.size(0) if self.dim < cond_item.ndim and cond_item.size(self.dim) == x_in.size(self.dim): - # if so, it's subsetting time - tell controls the expected indeces so they can handle them + # if so, it's subsetting time - tell controls the expected indices so they can handle them actual_cond_item = window.get_tensor(cond_item) resized_actual_cond[key] = actual_cond_item.to(device) else: diff --git a/comfy/hooks.py b/comfy/hooks.py index 9d0731072..0aa019e91 100644 --- a/comfy/hooks.py +++ b/comfy/hooks.py @@ -93,7 +93,7 @@ class Hook: self.hook_scope = hook_scope '''Scope of where this hook should apply in terms of the conds used in sampling run.''' self.custom_should_register = default_should_register - '''Can be overriden with a compatible function to decide if this hook should be registered without the need to override .should_register''' + '''Can be overridden with a compatible function to decide if this hook should be registered without the need to override .should_register''' @property def strength(self): diff --git a/comfy/ldm/ace/lyric_encoder.py b/comfy/ldm/ace/lyric_encoder.py index ff4359b26..63edbbf05 100644 --- a/comfy/ldm/ace/lyric_encoder.py +++ b/comfy/ldm/ace/lyric_encoder.py @@ -136,11 +136,11 @@ class ConvolutionModule(nn.Module): class PositionwiseFeedForward(torch.nn.Module): """Positionwise feed forward layer. - FeedForward are appied on each position of the sequence. + FeedForward are applied on each position of the sequence. The output dim is same with the input dim. Args: - idim (int): Input dimenstion. + idim (int): Input dimension. hidden_units (int): The number of hidden units. dropout_rate (float): Dropout rate. activation (torch.nn.Module): Activation function @@ -758,7 +758,7 @@ class EspnetRelPositionalEncoding(torch.nn.Module): if self.pe.dtype != x.dtype or self.pe.device != x.device: self.pe = self.pe.to(dtype=x.dtype, device=x.device) return - # Suppose `i` means to the position of query vecotr and `j` means the + # Suppose `i` means to the position of query vector and `j` means the # position of key vector. We use position relative positions when keys # are to the left (i>j) and negative relative positions otherwise (i None: """ Called when an extension is loaded. - This should be used to initialize any global resources neeeded by the extension. + This should be used to initialize any global resources needed by the extension. """ @abstractmethod diff --git a/comfy_api_nodes/nodes_kling.py b/comfy_api_nodes/nodes_kling.py index 5f55b2cc9..8a72c892d 100644 --- a/comfy_api_nodes/nodes_kling.py +++ b/comfy_api_nodes/nodes_kling.py @@ -173,7 +173,7 @@ def is_valid_image_response(response: KlingVirtualTryOnResponse) -> bool: def validate_prompts(prompt: str, negative_prompt: str, max_length: int) -> bool: - """Verifies that the positive prompt is not empty and that neither promt is too long.""" + """Verifies that the positive prompt is not empty and that neither prompt is too long.""" if not prompt: raise ValueError("Positive prompt is empty") if len(prompt) > max_length: diff --git a/comfy_api_nodes/nodes_recraft.py b/comfy_api_nodes/nodes_recraft.py index c8516b368..f0061cb7b 100644 --- a/comfy_api_nodes/nodes_recraft.py +++ b/comfy_api_nodes/nodes_recraft.py @@ -89,7 +89,7 @@ def recraft_multipart_parser(data, parent_key=None, formatter: callable=None, co The OpenAI client that Recraft uses has a bizarre way of serializing lists: - It does NOT keep track of indeces of each list, so for background_color, that must be serialized as: + It does NOT keep track of indices of each list, so for background_color, that must be serialized as: 'background_color[rgb][]' = [0, 0, 255] where the array is assigned to a key that has '[]' at the end, to signal it's an array. diff --git a/comfy_extras/nodes_camera_trajectory.py b/comfy_extras/nodes_camera_trajectory.py index eb7ef363c..9b40386de 100644 --- a/comfy_extras/nodes_camera_trajectory.py +++ b/comfy_extras/nodes_camera_trajectory.py @@ -114,7 +114,7 @@ def ray_condition(K, c2w, H, W, device): rays_d = directions @ c2w[..., :3, :3].transpose(-1, -2) # B, V, 3, HW rays_o = c2w[..., :3, 3] # B, V, 3 rays_o = rays_o[:, :, None].expand_as(rays_d) # B, V, 3, HW - # c2w @ dirctions + # c2w @ directions rays_dxo = torch.cross(rays_o, rays_d) plucker = torch.cat([rays_dxo, rays_d], dim=-1) plucker = plucker.reshape(B, c2w.shape[1], H, W, 6) # B, V, H, W, 6 diff --git a/tests/execution/testing_nodes/testing-pack/specific_tests.py b/tests/execution/testing_nodes/testing-pack/specific_tests.py index 4f8f01ae4..a23969ff1 100644 --- a/tests/execution/testing_nodes/testing-pack/specific_tests.py +++ b/tests/execution/testing_nodes/testing-pack/specific_tests.py @@ -297,7 +297,7 @@ class TestDynamicDependencyCycle: mix1 = g.node("TestLazyMixImages", image1=input1, mask=mask.out(0)) mix2 = g.node("TestLazyMixImages", image1=mix1.out(0), image2=input2, mask=mask.out(0)) - # Create the cyle + # Create the cycle mix1.set_input("image2", mix2.out(0)) return {