Skip to content

Commit

Permalink
text to image aspect ratio support added
Browse files Browse the repository at this point in the history
  • Loading branch information
siam009 committed Jan 1, 2024
1 parent faebc6e commit 647ae6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ def text2imggenerateapi(self, prompt: str = Body(title='user prompt'),
cfg_scale: float = Body(None, title="cfg scale"),
batch_size: int = Body(1, title="no of image to produce at a single batch which may produce same type image"),
style: str = Body("base", title='selected style of user'),
size: int = Body(768, title = 'height & width of generated image')):
height: int = Body(512, title = 'height of generated image'),
width: int = Body(512, title = 'width of generated image')):
start_time = time.time()
utc_time = datetime.datetime.now(timezone.utc)

Expand Down Expand Up @@ -330,7 +331,7 @@ def text2imggenerateapi(self, prompt: str = Body(title='user prompt'),
n_iter = batch_count,
batch_size = batch_size,
cfg_scale = cfg_scale if cfg_scale else data.cfg,
height = size, width = size,
height = height, width = width,
seed = seed,
denoising_strength = data.denoising_strength)

Expand Down

0 comments on commit 647ae6f

Please sign in to comment.