mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
Fix typos and add Typo check GitHub Action (#483)
* Fix typos * Add a typo check action * Fix a bug * Changed to manual typo check currently Ref: https://github.com/huggingface/diffusers/pull/483#pullrequestreview-1104468010 Co-authored-by: Anton Lozhkov <aglozhkov@gmail.com> * Removed a confusing message * Renamed "nin_shortcut" to "in_shortcut" * Add memo about NIN Co-authored-by: Anton Lozhkov <aglozhkov@gmail.com>
This commit is contained in:
@@ -22,7 +22,7 @@ def renew_resnet_paths(old_list, n_shave_prefix_segments=0):
|
||||
new_item = old_item
|
||||
new_item = new_item.replace("block.", "resnets.")
|
||||
new_item = new_item.replace("conv_shorcut", "conv1")
|
||||
new_item = new_item.replace("nin_shortcut", "conv_shortcut")
|
||||
new_item = new_item.replace("in_shortcut", "conv_shortcut")
|
||||
new_item = new_item.replace("temb_proj", "time_emb_proj")
|
||||
|
||||
new_item = shave_segments(new_item, n_shave_prefix_segments=n_shave_prefix_segments)
|
||||
|
||||
@@ -124,4 +124,4 @@ for mod in models:
|
||||
assert torch.allclose(
|
||||
logits[0, 0, 0, :30], results["_".join("_".join(mod.modelId.split("/")).split("-"))], atol=1e-3
|
||||
)
|
||||
print(f"{mod.modelId} has passed succesfully!!!")
|
||||
print(f"{mod.modelId} has passed successfully!!!")
|
||||
|
||||
Reference in New Issue
Block a user