fix typos

This commit is contained in:
Kohya S
2024-08-09 23:02:51 +09:00
parent 36b2e6fc28
commit 808d2d1f48
3 changed files with 4 additions and 4 deletions

View File

@@ -685,11 +685,11 @@ class DoubleStreamBlock(nn.Module):
attn = attention(q, k, v, pe=pe)
txt_attn, img_attn = attn[:, : txt.shape[1]], attn[:, txt.shape[1] :]
# calculate the img bloks
# calculate the img blocks
img = img + img_mod1.gate * self.img_attn.proj(img_attn)
img = img + img_mod2.gate * self.img_mlp((1 + img_mod2.scale) * self.img_norm2(img) + img_mod2.shift)
# calculate the txt bloks
# calculate the txt blocks
txt = txt + txt_mod1.gate * self.txt_attn.proj(txt_attn)
txt = txt + txt_mod2.gate * self.txt_mlp((1 + txt_mod2.scale) * self.txt_norm2(txt) + txt_mod2.shift)
return img, txt

View File

@@ -20,7 +20,7 @@ MODEL_VERSION_FLUX_V1 = "flux1"
def load_flow_model(name: str, ckpt_path: str, dtype: torch.dtype, device: Union[str, torch.device]) -> flux_models.Flux:
logger.info(f"Bulding Flux model {name}")
logger.info(f"Building Flux model {name}")
with torch.device("meta"):
model = flux_models.Flux(flux_models.configs[name].params).to(dtype)