File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/diffusers/pipelines/omnigen Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ def check_inputs(
199199 input_images ,
200200 height ,
201201 width ,
202+ use_input_image_size_as_output ,
202203 callback_on_step_end_tensor_inputs = None ,
203204 max_sequence_length = None ,
204205 ):
@@ -219,6 +220,12 @@ def check_inputs(
219220 f"`height` and `width` have to be divisible by { self .vae_scale_factor * 2 } but are { height } and { width } . Dimensions will be resized accordingly"
220221 )
221222
223+ if use_input_image_size_as_output :
224+ if input_images is None or input_images [0 ] is None :
225+ raise ValueError (
226+ f"`use_input_image_size_as_output` is set to True, but no input image was found. If you are performing a text-to-image task, please set it to False."
227+ )
228+
222229 if callback_on_step_end_tensor_inputs is not None and not all (
223230 k in self ._callback_tensor_inputs for k in callback_on_step_end_tensor_inputs
224231 ):
@@ -406,6 +413,7 @@ def __call__(
406413 input_images ,
407414 height ,
408415 width ,
416+ use_input_image_size_as_output ,
409417 callback_on_step_end_tensor_inputs = callback_on_step_end_tensor_inputs ,
410418 max_sequence_length = max_sequence_length ,
411419 )
You can’t perform that action at this time.
0 commit comments