Skip to content

Commit

Permalink
🎨 chore(generate_image): Update generate_image module
Browse files Browse the repository at this point in the history
- Set `self.parameters.sm` and `self.parameters.sm_dyn` to `False` when the
  action is IMG2IMG
- Update warning message for infill mode requiring a mask
- Refactor code for setting `self.parameters.extra_noise_seed`
  • Loading branch information
sudoskys committed Feb 17, 2024
1 parent dbc2d62 commit 420be8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/novelai_python/sdk/ai/generate_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ def validate_model(self):
logger.warning("Mask maybe required for infill mode.")
if self.action != Action.GENERATE:
self.parameters.extra_noise_seed = self.parameters.seed
if self.action == Action.IMG2IMG:
self.parameters.sm = False
self.parameters.sm_dyn = False
return self

@property
Expand Down

0 comments on commit 420be8a

Please sign in to comment.