Skip to content

Commit

Permalink
Update _type_mapping, allow .copy() to work.
Browse files Browse the repository at this point in the history
  • Loading branch information
agentd00nut committed Dec 3, 2023
1 parent 03d3a5a commit 52df5f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions novelai_api/ImagePreset.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class ImagePreset:
}

_TYPE_MAPPING = {
"legacy": bool,
"quality_toggle": bool,
"resolution": (ImageResolution, tuple),
"uc_preset": (UCPreset, NoneType),
Expand All @@ -208,6 +209,7 @@ class ImagePreset:
"noise": (int, float),
"strength": (int, float),
"scale": (int, float),
"uncond_scale": (int, float),
"steps": int,
"uc": str,
"smea": bool,
Expand All @@ -219,6 +221,8 @@ class ImagePreset:
"decrisper": bool,
"add_original_image": bool,
"mask": str,
"cfg_rescale": float,
"noise_schedule": str,
}

# type completion for __setitem__ and __getitem__
Expand Down

0 comments on commit 52df5f2

Please sign in to comment.