ai-forever commited on
Commit
b8b6401
·
verified ·
1 Parent(s): 6e75167

add rounding to image size

Browse files
Files changed (1) hide show
  1. src/constructor.py +2 -2
src/constructor.py CHANGED
@@ -79,7 +79,7 @@ def generate_presentation(
79
  image_width, image_height = random.choice(
80
  [(768, 1344), (1024, 1024)]
81
  )
82
- image_width, image_height = image_size_coef * image_width, image_size_coef * image_height
83
  caption_prompt = llm_generate_image_prompt(
84
  llm_generate,
85
  description,
@@ -104,7 +104,7 @@ def generate_presentation(
104
 
105
  if picture_path is None:
106
  # background_width, background_height = 1344, 768
107
- background_width, background_height = image_size_coef * 1344, image_size_coef * 768
108
  background_prompt = llm_generate_background_prompt(
109
  llm_generate,
110
  description,
 
79
  image_width, image_height = random.choice(
80
  [(768, 1344), (1024, 1024)]
81
  )
82
+ image_width, image_height = round(image_size_coef * image_width), round(image_size_coef * image_height)
83
  caption_prompt = llm_generate_image_prompt(
84
  llm_generate,
85
  description,
 
104
 
105
  if picture_path is None:
106
  # background_width, background_height = 1344, 768
107
+ background_width, background_height = round(image_size_coef * 1344), round(image_size_coef * 768)
108
  background_prompt = llm_generate_background_prompt(
109
  llm_generate,
110
  description,