Fix typos

Found via `codespell -S ./imaginairy/vendored`
pull/112/head
Kian-Meng Ang 1 year ago committed by Bryce Drennan
parent 58c2897dd1
commit 3d04df4dee

@ -1,4 +1,4 @@
Copyright 2022 Bryce Drennan (and numerous other contributers as documented)
Copyright 2022 Bryce Drennan (and numerous other contributors as documented)
(for modifications on top of CompVis code)
The MIT License

@ -245,7 +245,7 @@ docker run -it --gpus all -v $HOME/.cache/huggingface:/root/.cache/huggingface -
**5.0.0**
- feature: 🎉 inpainting support using new inpainting model from RunwayML. It works really well! By default, the
inpainting model will automatically be used for any image-masking task
- feature: 🎉 new default sampler makes image generation mor than twice as fast
- feature: 🎉 new default sampler makes image generation more than twice as fast
- feature: added `DPM++ 2S a` and `DPM++ 2M` samplers.
- feature: improve progress image logging
- fix: fix bug with `--show-work`. fixes #84
@ -315,7 +315,7 @@ would be uncorrelated to the rest of the surrounding image. It created terrible
- fix: another bfloat16 fix
**1.6.1**
- fix: make sure image tensors come to the CPU as float32 so there aren't compatability issues with non-bfloat16 cpus
- fix: make sure image tensors come to the CPU as float32 so there aren't compatibility issues with non-bfloat16 cpus
**1.6.0**
- fix: *maybe* address #13 with `expected scalar type BFloat16 but found Float`
@ -361,7 +361,7 @@ would be uncorrelated to the rest of the surrounding image. It created terrible
- https://github.com/CompVis/stable-diffusion/pull/177
- https://github.com/huggingface/diffusers/pull/532/files
- https://github.com/HazyResearch/flash-attention
- xformers improvments https://www.photoroom.com/tech/stable-diffusion-100-percent-faster-with-memory-efficient-attention/
- xformers improvements https://www.photoroom.com/tech/stable-diffusion-100-percent-faster-with-memory-efficient-attention/
- Development Environment
- ✅ add tests
- ✅ set up ci (test/lint/format)
@ -458,7 +458,7 @@ would be uncorrelated to the rest of the surrounding image. It created terrible
- find similar images https://knn5.laion.ai/?back=https%3A%2F%2Fknn5.laion.ai%2F&index=laion5B&useMclip=false
- https://github.com/vicgalle/stable-diffusion-aesthetic-gradients
## Noteable Stable Diffusion Implementations
## Notable Stable Diffusion Implementations
- https://github.com/ahrm/UnstableFusion
- https://github.com/AUTOMATIC1111/stable-diffusion-webui
- https://github.com/blueturtleai/gimp-stable-diffusion

@ -21,7 +21,7 @@ NOW THEREFORE, You and Licensor agree as follows:
- "License" means the terms and conditions for use, reproduction, and Distribution as defined in this document.
- "Data" means a collection of information and/or content extracted from the dataset used with the Model, including to train, pretrain, or otherwise evaluate the Model. The Data is not licensed under this License.
- "Output" means the results of operating a Model as embodied in informational content resulting therefrom.
- "Output" means the results of operating a Model as embodied in informational content resulting there from.
- "Model" means any accompanying machine-learning based assemblies (including checkpoints), consisting of learnt weights, parameters (including optimizer states), corresponding to the model architecture as embodied in the Complementary Material, that have been trained or tuned, in whole or in part on the Data, using the Complementary Material.
- "Derivatives of the Model" means all modifications to the Model, works based on the Model, or any other model which is created or initialized by transfer of patterns of the weights, parameters, activations or output of the Model, to the other model, in order to cause the other model to perform similarly to the Model, including - but not limited to - distillation methods entailing the use of intermediate data representations or methods based on the generation of synthetic data by the Model for training the other model.
- "Complementary Material" means the accompanying source code and scripts used to define, run, load, benchmark or evaluate the Model, and used to prepare data for training or evaluation, if any. This includes any accompanying documentation, tutorials, examples, etc, if any.

@ -17,7 +17,7 @@ model:
scale_factor: 0.18215
finetune_keys: null
scheduler_config: # 10000 warmup steps
scheduler_config: # 10000 warm-up steps
target: ldm.lr_scheduler.LambdaLinearScheduler
params:
warm_up_steps: [ 2500 ] # NOTE for resuming. use 10000 if starting from scratch

@ -16,7 +16,7 @@ model:
monitor: val/loss_simple_ema
scale_factor: 0.18215
scheduler_config: # 10000 warmup steps
scheduler_config: # 10000 warm-up steps
target: imaginairy.lr_scheduler.LambdaLinearScheduler
params:
warm_up_steps: [ 10000 ]

@ -493,7 +493,7 @@ class DDPM(pl.LightningModule):
target = self.get_v(x_start, noise, t)
else:
raise NotImplementedError(
f"Paramterization {self.parameterization} not yet supported"
f"Parameterization {self.parameterization} not yet supported"
)
loss = self.get_loss(model_out, target, mean=False).mean(dim=[1, 2, 3])
@ -1051,7 +1051,7 @@ class LatentDiffusion(DDPM):
def apply_model(self, x_noisy, t, cond, return_ids=False):
if isinstance(cond, dict):
# hybrid case, cond is exptected to be a dict
# hybrid case, cond is expected to be a dict
pass
else:
if not isinstance(cond, list):
@ -1109,7 +1109,7 @@ class LatentDiffusion(DDPM):
num_downs = self.first_stage_model.encoder.num_resolutions - 1
rescale_latent = 2 ** (num_downs)
# get top left postions of patches as conforming for the bbbox tokenizer, therefore we
# get top left positions of patches as conforming for the bbbox tokenizer, therefore we
# need to rescale the tl patch coordinates to be in between (0,1)
tl_patch_coordinates = [
(
@ -1175,7 +1175,7 @@ class LatentDiffusion(DDPM):
]
assert not isinstance(
output_list[0], tuple
) # todo cant deal with multiple model outputs check this never happens
) # todo can't deal with multiple model outputs check this never happens
o = torch.stack(output_list, axis=-1)
o = o * weighting

@ -359,7 +359,7 @@ def count_flops_attn(model, _x, y):
class QKVAttentionLegacy(nn.Module):
"""
A module which performs QKV attention. Matches legacy QKVAttention + input/ouput heads shaping
A module which performs QKV attention. Matches legacy QKVAttention + input/output heads shaping
"""
def __init__(self, n_heads):

@ -198,7 +198,7 @@ class PLMSSampler:
# 2nd order Pseudo Linear Multistep (Adams-Bashforth)
e_t_prime = (3 * noise_pred - old_eps[-1]) / 2
elif len(old_eps) == 2:
# 3nd order Pseudo Linear Multistep (Adams-Bashforth)
# 3rd order Pseudo Linear Multistep (Adams-Bashforth)
e_t_prime = (23 * noise_pred - 16 * old_eps[-1] + 5 * old_eps[-2]) / 12
elif len(old_eps) >= 3:
# 4nd order Pseudo Linear Multistep (Adams-Bashforth)

@ -78,7 +78,7 @@
# to_tensor_tfm = transforms.ToTensor()
#
#
# # mismatch of tons of image encoding / decoding / loading functions i cant be asked to clean up right now
# # mismatch of tons of image encoding / decoding / loading functions i can't be asked to clean up right now
#
# def pil_to_latent(input_im):
# # Single image -> single latent in a batch (so size 1, 4, 64, 64)
@ -154,7 +154,7 @@
# text = text[idx + 1:]
# # find value for weight
# if " " in text:
# idx = text.index(" ") # first occurence
# idx = text.index(" ") # first occurrence
# else: # no space, read to end
# idx = len(text)
# if idx != 0:
@ -303,7 +303,7 @@
# linx = np.linspace(0, 5, h // 8, endpoint=False)
# liny = np.linspace(0, 5, w // 8, endpoint=False)
# x, y = np.meshgrid(liny, linx)
# p = [np.expand_dims(perlin(x, y, seed=i), 0) for i in range(4)] # reproducable seed
# p = [np.expand_dims(perlin(x, y, seed=i), 0) for i in range(4)] # reproducible seed
# p = np.concatenate(p, 0)
# p = torch.tensor(p).unsqueeze(0).cuda()
# latents = latents + (p * args.perlin_multi).to(get_device()).half()

Loading…
Cancel
Save