linoyts HF Staff commited on
Commit
56e8120
·
verified ·
1 Parent(s): 26a216a

fix resizing (#2)

Browse files
Files changed (1) hide show
  1. kontext_pipeline.py +2 -1
kontext_pipeline.py CHANGED
@@ -954,7 +954,8 @@ class FluxKontextPipeline(
954
  image_height = image_height // multiple_of * multiple_of
955
  image = self.image_processor.resize(image, image_height, image_width)
956
  image = self.image_processor.preprocess(image, image_height, image_width)
957
-
 
958
  # 4. Prepare latent variables
959
  num_channels_latents = self.transformer.config.in_channels // 4
960
  latents, image_latents, latent_ids, image_ids = self.prepare_latents(
 
954
  image_height = image_height // multiple_of * multiple_of
955
  image = self.image_processor.resize(image, image_height, image_width)
956
  image = self.image_processor.preprocess(image, image_height, image_width)
957
+ width,height = image_width,image_height #override width,height when input is resized to match aspect ratio bucket
958
+
959
  # 4. Prepare latent variables
960
  num_channels_latents = self.transformer.config.in_channels // 4
961
  latents, image_latents, latent_ids, image_ids = self.prepare_latents(