Merge pull request #16060 from xiaoxianBoy/fix-typos

chore: fix typos
This commit is contained in:
AUTOMATIC1111 2024-07-06 10:06:35 +03:00 committed by GitHub
commit 2fec94710b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 6 deletions

View File

@ -572,7 +572,7 @@ class LatentDiffusionV1(DDPMV1):
:param h: height :param h: height
:param w: width :param w: width
:return: normalized distance to image border, :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) lower_right_corner = torch.tensor([h - 1, w - 1]).view(1, 1, 2)
arr = self.meshgrid(h, w) / lower_right_corner arr = self.meshgrid(h, w) / lower_right_corner

View File

@ -372,7 +372,7 @@ class Api:
return {} return {}
possible_fields = infotext_utils.paste_fields[tabname]["fields"] 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) params = infotext_utils.parse_generation_parameters(request.infotext)
def get_field_value(field, params): def get_field_value(field, params):

View File

@ -268,7 +268,7 @@ def test_for_nans(x, where):
@lru_cache @lru_cache
def first_time_calculation(): 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. spends about 2.7 seconds doing that, at least with NVidia.
""" """

View File

@ -323,7 +323,7 @@ def model_wrapper(
def model_fn(x, t_continuous, condition, unconditional_condition): 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: if t_continuous.reshape((-1,)).shape[0] == 1:
t_continuous = t_continuous.expand((x.shape[0])) t_continuous = t_continuous.expand((x.shape[0]))

View File

@ -47,7 +47,7 @@ restricted_opts: set[str] = None
sd_model: sd_models_types.WebuiSdModel = None sd_model: sd_models_types.WebuiSdModel = None
settings_components: dict = 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 = [] tab_names = []

View File

@ -156,7 +156,7 @@ class MassFileLister:
def topological_sort(dependencies): def topological_sort(dependencies):
"""Accepts a dictionary mapping name to its dependencies, returns a list of names ordered according to 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 = {} visited = {}