From 13f22974a42df9f7a491fefe2912cdf72dcbebaf Mon Sep 17 00:00:00 2001 From: snoppy Date: Fri, 21 Jun 2024 09:52:02 +0800 Subject: [PATCH] chore: fix typos Signed-off-by: snoppy --- extensions-builtin/LDSR/sd_hijack_ddpm_v1.py | 2 +- modules/api/api.py | 2 +- modules/devices.py | 2 +- modules/models/diffusion/uni_pc/uni_pc.py | 2 +- modules/shared.py | 2 +- modules/util.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py b/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py index 9a1e0778f..51ab18212 100644 --- a/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py +++ b/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py @@ -572,7 +572,7 @@ class LatentDiffusionV1(DDPMV1): :param h: height :param w: width :return: normalized distance to image border, - wtith min distance = 0 at border and max dist = 0.5 at image center + with min distance = 0 at border and max dist = 0.5 at image center """ lower_right_corner = torch.tensor([h - 1, w - 1]).view(1, 1, 2) arr = self.meshgrid(h, w) / lower_right_corner diff --git a/modules/api/api.py b/modules/api/api.py index f468c3852..3d208b711 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -372,7 +372,7 @@ class Api: return {} possible_fields = infotext_utils.paste_fields[tabname]["fields"] - set_fields = request.model_dump(exclude_unset=True) if hasattr(request, "request") else request.dict(exclude_unset=True) # pydantic v1/v2 have differenrt names for this + set_fields = request.model_dump(exclude_unset=True) if hasattr(request, "request") else request.dict(exclude_unset=True) # pydantic v1/v2 have different names for this params = infotext_utils.parse_generation_parameters(request.infotext) def get_field_value(field, params): diff --git a/modules/devices.py b/modules/devices.py index e4f671ac6..d4cf2bc68 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -258,7 +258,7 @@ def test_for_nans(x, where): @lru_cache def first_time_calculation(): """ - just do any calculation with pytorch layers - the first time this is done it allocaltes about 700MB of memory and + just do any calculation with pytorch layers - the first time this is done it allocates about 700MB of memory and spends about 2.7 seconds doing that, at least with NVidia. """ diff --git a/modules/models/diffusion/uni_pc/uni_pc.py b/modules/models/diffusion/uni_pc/uni_pc.py index d257a7286..3333bc808 100644 --- a/modules/models/diffusion/uni_pc/uni_pc.py +++ b/modules/models/diffusion/uni_pc/uni_pc.py @@ -323,7 +323,7 @@ def model_wrapper( def model_fn(x, t_continuous, condition, unconditional_condition): """ - The noise predicition model function that is used for DPM-Solver. + The noise prediction model function that is used for DPM-Solver. """ if t_continuous.reshape((-1,)).shape[0] == 1: t_continuous = t_continuous.expand((x.shape[0])) diff --git a/modules/shared.py b/modules/shared.py index a41cd457c..2a3787f99 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -47,7 +47,7 @@ restricted_opts: set[str] = None sd_model: sd_models_types.WebuiSdModel = None settings_components: dict = None -"""assigned from ui.py, a mapping on setting names to gradio components repsponsible for those settings""" +"""assigned from ui.py, a mapping on setting names to gradio components responsible for those settings""" tab_names = [] diff --git a/modules/util.py b/modules/util.py index 0db13736c..1fd736c7c 100644 --- a/modules/util.py +++ b/modules/util.py @@ -156,7 +156,7 @@ class MassFileLister: def topological_sort(dependencies): """Accepts a dictionary mapping name to its dependencies, returns a list of names ordered according to dependencies. - Ignores errors relating to missing dependeencies or circular dependencies + Ignores errors relating to missing dependencies or circular dependencies """ visited = {}