mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
chore: fix typos
Signed-off-by: snoppy <michaleli@foxmail.com>
This commit is contained in:
parent
feee37d75f
commit
13f22974a4
@ -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
|
||||||
|
@ -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):
|
||||||
|
@ -258,7 +258,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.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -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]))
|
||||||
|
@ -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 = []
|
||||||
|
|
||||||
|
@ -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 = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user