chore: Fix typos
This commit is contained in:
parent
610a7f4e14
commit
432782163a
|
@ -34,7 +34,7 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
|
|||
- Sampling method selection
|
||||
- Interrupt processing at any time
|
||||
- 4GB video card support (also reports of 2GB working)
|
||||
- Correct seeds for batches
|
||||
- Correct seeds for batches
|
||||
- Prompt length validation
|
||||
- get length of prompt in tokens as you type
|
||||
- get a warning after generation if some text was truncated
|
||||
|
|
|
@ -95,7 +95,7 @@ function showGalleryImage(){
|
|||
|
||||
e.addEventListener('click', function (evt) {
|
||||
if(!opts.js_modal_lightbox) return;
|
||||
modalZoomSet(gradioApp().getElementById('modalImage'), opts.js_modal_lightbox_initialy_zoomed)
|
||||
modalZoomSet(gradioApp().getElementById('modalImage'), opts.js_modal_lightbox_initially_zoomed)
|
||||
showModal(evt)
|
||||
},true);
|
||||
}
|
||||
|
|
|
@ -140,11 +140,11 @@ class InterrogateModels:
|
|||
|
||||
res = caption
|
||||
|
||||
cilp_image = self.clip_preprocess(pil_image).unsqueeze(0).type(self.dtype).to(shared.device)
|
||||
clip_image = self.clip_preprocess(pil_image).unsqueeze(0).type(self.dtype).to(shared.device)
|
||||
|
||||
precision_scope = torch.autocast if shared.cmd_opts.precision == "autocast" else contextlib.nullcontext
|
||||
with torch.no_grad(), precision_scope("cuda"):
|
||||
image_features = self.clip_model.encode_image(cilp_image).type(self.dtype)
|
||||
image_features = self.clip_model.encode_image(clip_image).type(self.dtype)
|
||||
|
||||
image_features /= image_features.norm(dim=-1, keepdim=True)
|
||||
|
||||
|
|
|
@ -386,7 +386,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
|
|||
|
||||
if state.interrupted or state.skipped:
|
||||
|
||||
# if we are interruped, sample returns just noise
|
||||
# if we are interrupted, sample returns just noise
|
||||
# use the image collected previously in sampler loop
|
||||
samples_ddim = shared.state.current_latent
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class WMSA(nn.Module):
|
|||
Returns:
|
||||
attn_mask: should be (1 1 w p p),
|
||||
"""
|
||||
# supporting sqaure.
|
||||
# supporting square.
|
||||
attn_mask = torch.zeros(h, w, p, p, p, p, dtype=torch.bool, device=self.relative_position_params.device)
|
||||
if self.type == 'W':
|
||||
return attn_mask
|
||||
|
@ -65,7 +65,7 @@ class WMSA(nn.Module):
|
|||
x = rearrange(x, 'b (w1 p1) (w2 p2) c -> b w1 w2 p1 p2 c', p1=self.window_size, p2=self.window_size)
|
||||
h_windows = x.size(1)
|
||||
w_windows = x.size(2)
|
||||
# sqaure validation
|
||||
# square validation
|
||||
# assert h_windows == w_windows
|
||||
|
||||
x = rearrange(x, 'b w1 w2 p1 p2 c -> b (w1 w2) (p1 p2) c', p1=self.window_size, p2=self.window_size)
|
||||
|
|
|
@ -147,7 +147,7 @@ def load_model_weights(model, checkpoint_file, sd_model_hash):
|
|||
model.first_stage_model.load_state_dict(vae_dict)
|
||||
|
||||
model.sd_model_hash = sd_model_hash
|
||||
model.sd_model_checkpint = checkpoint_file
|
||||
model.sd_model_checkpoint = checkpoint_file
|
||||
|
||||
|
||||
def load_model():
|
||||
|
@ -175,7 +175,7 @@ def reload_model_weights(sd_model, info=None):
|
|||
from modules import lowvram, devices, sd_hijack
|
||||
checkpoint_info = info or select_checkpoint()
|
||||
|
||||
if sd_model.sd_model_checkpint == checkpoint_info.filename:
|
||||
if sd_model.sd_model_checkpoint == checkpoint_info.filename:
|
||||
return
|
||||
|
||||
if shared.cmd_opts.lowvram or shared.cmd_opts.medvram:
|
||||
|
|
|
@ -181,7 +181,7 @@ class VanillaStableDiffusionSampler:
|
|||
|
||||
self.initialize(p)
|
||||
|
||||
# existing code fails with cetain step counts, like 9
|
||||
# existing code fails with certain step counts, like 9
|
||||
try:
|
||||
self.sampler.make_schedule(ddim_num_steps=steps, ddim_eta=self.eta, ddim_discretize=p.ddim_discretize, verbose=False)
|
||||
except Exception:
|
||||
|
@ -204,7 +204,7 @@ class VanillaStableDiffusionSampler:
|
|||
|
||||
steps = steps or p.steps
|
||||
|
||||
# existing code fails with cetin step counts, like 9
|
||||
# existing code fails with certain step counts, like 9
|
||||
try:
|
||||
samples_ddim, _ = self.sampler.sample(S=steps, conditioning=conditioning, batch_size=int(x.shape[0]), shape=x[0].shape, verbose=False, unconditional_guidance_scale=p.cfg_scale, unconditional_conditioning=unconditional_conditioning, x_T=x, eta=self.eta)
|
||||
except Exception:
|
||||
|
|
|
@ -141,9 +141,9 @@ class OptionInfo:
|
|||
self.section = None
|
||||
|
||||
|
||||
def options_section(section_identifer, options_dict):
|
||||
def options_section(section_identifier, options_dict):
|
||||
for k, v in options_dict.items():
|
||||
v.section = section_identifer
|
||||
v.section = section_identifier
|
||||
|
||||
return options_dict
|
||||
|
||||
|
@ -246,7 +246,7 @@ options_templates.update(options_section(('ui', "User interface"), {
|
|||
"add_model_hash_to_info": OptionInfo(True, "Add model hash to generation information"),
|
||||
"font": OptionInfo("", "Font for image grids that have text"),
|
||||
"js_modal_lightbox": OptionInfo(True, "Enable full page image viewer"),
|
||||
"js_modal_lightbox_initialy_zoomed": OptionInfo(True, "Show images zoomed in by default in full page image viewer"),
|
||||
"js_modal_lightbox_initially_zoomed": OptionInfo(True, "Show images zoomed in by default in full page image viewer"),
|
||||
"show_progress_in_title": OptionInfo(True, "Show generation progress in window title."),
|
||||
}))
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ class SwinTransformerBlock(nn.Module):
|
|||
|
||||
Args:
|
||||
dim (int): Number of input channels.
|
||||
input_resolution (tuple[int]): Input resulotion.
|
||||
input_resolution (tuple[int]): Input resolution.
|
||||
num_heads (int): Number of attention heads.
|
||||
window_size (int): Window size.
|
||||
shift_size (int): Shift size for SW-MSA.
|
||||
|
|
|
@ -38,7 +38,7 @@ from modules import prompt_parser
|
|||
from modules.images import save_image
|
||||
import modules.textual_inversion.ui
|
||||
|
||||
# this is a fix for Windows users. Without it, javascript files will be served with text/html content-type and the bowser will not show any UI
|
||||
# this is a fix for Windows users. Without it, javascript files will be served with text/html content-type and the browser will not show any UI
|
||||
mimetypes.init()
|
||||
mimetypes.add_type('application/javascript', '.js')
|
||||
|
||||
|
@ -102,7 +102,7 @@ def save_files(js_data, images, index):
|
|||
import csv
|
||||
filenames = []
|
||||
|
||||
#quick dictionary to class object conversion. Its neccesary due apply_filename_pattern requiring it
|
||||
#quick dictionary to class object conversion. Its necessary due apply_filename_pattern requiring it
|
||||
class MyObject:
|
||||
def __init__(self, d=None):
|
||||
if d is not None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user