diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index abd2f7e..2f54472 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -571,4 +571,10 @@ For instance: **What's new?** -- feat: Termux extra installation options : `termux-cli`, `termux-api` and `termux-all` \ No newline at end of file +- feat: Termux extra installation options : `termux-cli`, `termux-api` and `termux-all` + +## v0.7.4 + +**What's new?** + +- fix : Image generation failure. \ No newline at end of file diff --git a/setup.py b/setup.py index 53d42aa..47e4155 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ setup( name="python-tgpt", - version="0.7.3", + version="0.7.4", license="MIT", author="Smartwa", maintainer="Smartwa", diff --git a/src/pytgpt/console.py b/src/pytgpt/console.py index c3cf816..ddf3ae6 100644 --- a/src/pytgpt/console.py +++ b/src/pytgpt/console.py @@ -2415,9 +2415,15 @@ class ImageGen: help="Disable prompt altering for effective image generation", ) @click.option("-q", "--quiet", is_flag=True, help="Suppress progress bar") + @click.option( + "-s", + "--stream", + help="Stream the image download process.", + is_flag=True, + ) @click.help_option("-h", "--help") def generate_image( - prompt, provider, directory, amount, name, timeout, proxy, no_additives, quiet + prompt, provider, directory, amount, name, timeout, proxy, no_additives, quiet, stream ): """Generate images with pollinations.ai""" provider_obj = this.image_providers_map.get(provider) @@ -2427,12 +2433,12 @@ def generate_image( total=amount, visible=quiet == False, ) - imager = provider_obj(timeout=timeout, proxies=proxy if proxy else {}) + imager:Prodia | Imager = provider_obj(timeout=timeout, proxies=proxy if proxy else {}) for image in imager.generate( prompt=prompt, amount=amount, additives=no_additives == False, - stream=True, + stream=stream, # Just a hack for temporary save. Raises "'async_generator' object is not iterable" ): imager.save([image], name=name, dir=directory) progress.update(task, advance=1)