@@ -51,7 +51,7 @@ class Dalle(SimpleService): 'prompt': translated_prompt, 'image_size': { 'width': input_message.info.pop('width', 1024), - 'height': input_message.info.pop('width', 1024) + 'height': input_message.info.pop('height', 1024) }, **input_message.info, } @@ -64,7 +64,7 @@ class Flux(SimpleService): 'prompt': translated_prompt, 'image_size': { 'width': input_message.info.pop('width', 1024), - 'height': input_message.info.pop('width', 1024) + 'height': input_message.info.pop('height', 1024) }, **input_message.info, } @@ -80,7 +80,7 @@ class Fluxproultra(SimpleService): 'prompt': self.translate_prompt(input_message.content), 'image_size': { 'width': input_message.info.pop('width', 1024), - 'height': input_message.info.pop('width', 1024) + 'height': input_message.info.pop('height', 1024) }, **input_message.info, } @@ -148,7 +148,7 @@ class Recraft(SimpleService): ), 'image_size': { 'width': input_message.info.pop('width', 1024), - 'height': input_message.info.pop('width', 1024) + 'height': input_message.info.pop('height', 1024) }, 'style': styles.get(input_message.info.pop('style'), 'любой'), **input_message.info, @@ -60,8 +60,11 @@ class Stablediffusion(SimpleService): translated_prompt = self.translate_prompt(input_message.content) callback_data = { 'prompt': translated_prompt, - 'image_size': 'square_hd', 'output_format': 'png', + 'image_size': { + 'width': input_message.info.pop('width', 1024), + 'height': input_message.info.pop('height', 1024) + }, **input_message.info, } result = fal_ai_run(f'{self._CALLBACK}{model_name}', callback_data)