Commit 43278216 authored by Aidan Holland's avatar Aidan Holland Committed by AUTOMATIC1111
Browse files

chore: Fix typos

parent 610a7f4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
                }
+2 −2
Original line number Diff line number Diff line
@@ -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)

+1 −1
Original line number Diff line number Diff line
@@ -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

+2 −2
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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:
Loading