\n<\/aside>\n<\/p>\n
Last week, Swiss software engineer Matthias B\u00fchlmann discovered that the popular image synthesis model Stable Diffusion could compress existing bitmapped images with fewer visual artifacts than JPEG or WebP at high compression ratios, though there are significant caveats.<\/p>\n
Stable Diffusion is an AI image synthesis model that typically generates images based on text descriptions (called “prompts”). The AI \u200b\u200bmodel learned this ability by studying millions of images pulled from the Internet. During the training process, the model makes statistical associations between images and related words, making a much smaller representation of key information about each image and storing them as “weights,” which are mathematical values \u200b\u200bthat represent what the AI \u200b\u200bimage model knows, so to speak.<\/p>\n
When Stable Diffusion analyzes and “compresses” images into weight form, they reside in what researchers call “latent space,” which is a way of saying that they exist as a sort of fuzzy potential that can be realized into images once they’re decoded . With Stable Diffusion 1.4, the weights file is roughly 4GB, but it represents knowledge about hundreds of millions of images.<\/p>\n\nenlarge
\/<\/span> Examples of using Stable Diffusion to compress images.<\/div>\n<\/figcaption><\/figure>\nWhile most people use Stable Diffusion with text prompts, B\u00fchlmann cut out the text encoder and instead forced his images through Stable Diffusion’s image encoder process, which takes a low-precision 512\u00d7512 image and turns it into a higher-precision 64\u00d764 latent space representation. At this point, the image exists at a much smaller data size than the original, but it can still be expanded (decoded) back into a 512\u00d7512 image with fairly good results.<\/p>\n\n Advertisement <\/span> <\/p>\n<\/aside>\nWhile running tests, B\u00fchlmann found that images compressed with Stable Diffusion looked subjectively better at higher compression ratios (smaller file size) than JPEG or WebP. In one example, he shows a photo of a candy shop that is compressed down to 5.68KB using JPEG, 5.71KB using WebP, and 4.98KB using Stable Diffusion. The Stable Diffusion image appears to have more resolved details and fewer obvious compression artifacts than those compressed in the other formats.<\/p>\n\nenlarge
\/<\/span> Experimental examples of using Stable Diffusion to compress images. SD results are on the far right.<\/div>\n<\/figcaption><\/figure>\nB\u00fchlmann’s method currently comes with significant limitations, however: It’s not good with faces or text, and in some cases, it can actually hallucinate detailed features in the decoded image that were not present in the source image. (You probably don’t want your image compressor inventing details in an image that don’t exist.) Also, decoding requires the 4GB Stable Diffusion weights file and extra decoding time.<\/p>\n
While this use of Stable Diffusion is unconventional and more of a fun hack than a practical solution, it could potentially point to a novel future use of image synthesis models. B\u00fchlmann’s code can be found on Google Colab, and you’ll find more technical details about his experiment in his post on Towards AI.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"
enlarge \/ These jagged, colorful blocks are exactly what the concept of image compression looks like. Benj Edwards \/ Ars Technica Last week, Swiss software engineer Matthias B\u00fchlmann discovered that the popular image synthesis model Stable Diffusion could compress existing bitmapped images with fewer visual artifacts than JPEG or WebP at high compression ratios, though …<\/p>\n
Better than JPEG? Researcher discovers that Stable Diffusion can compress images<\/span> Read More »<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":67841,"url":"https:\/\/harchi90.com\/with-stable-diffusion-you-may-never-believe-what-you-see-online-again\/","url_meta":{"origin":80021,"position":0},"title":"With Stable Diffusion, you may never believe what you see online again","date":"September 6, 2022","format":false,"excerpt":"enlarge \/ Did you know that Abraham Lincoln was a cowboy? Stable Diffusion does.Benj Edwards \/ Stable Diffusion AI image generation is here in a big way. A newly released open source image synthesis model called Stable Diffusion allows anyone with a PC and a decent GPU to conjure up\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"A screenshot of the OpenAI DALL-E 2 website.","src":"https:\/\/i0.wp.com\/cdn.arstechnica.net\/wp-content\/uploads\/2022\/09\/dalle2_website_2-640x283.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":81386,"url":"https:\/\/harchi90.com\/dall-e-image-generator-is-now-open-to-everyone\/","url_meta":{"origin":80021,"position":1},"title":"DALL-E image generator is now open to everyone","date":"September 29, 2022","format":false,"excerpt":"enlarge \/ An artwork created with OpenAI's DALL-E image generator.OpenAI If you've been itching to try OpenAI's image synthesis tool but have been stymied by the lack of an invitation, now's your chance. Today, OpenAI announced that it removed the waitlist for its DALL-E AI image generator service. That means\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"A DALL-E example of ","src":"https:\/\/i0.wp.com\/cdn.arstechnica.net\/wp-content\/uploads\/2022\/09\/1-640x640.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":64364,"url":"https:\/\/harchi90.com\/stable-diffusion-brings-local-ai-art-generation-to-your-pc\/","url_meta":{"origin":80021,"position":2},"title":"Stable Diffusion Brings Local AI Art Generation to Your PC","date":"September 3, 2022","format":false,"excerpt":"Stability AI AI-generated artwork is incredibly popular now. It's now possible to generate photorealistic images right on your PC, without using external services like Midjourney or DALL-E 2. Stability AI is a tech startup developing the \u201cStable Diffusion\u201d AI model, which is a complex algorithm trained on images from the\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"Stable Diffusion demo art","src":"https:\/\/i0.wp.com\/www.howtogeek.com\/wp-content\/uploads\/2022\/09\/Stable-Diffusion.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":64145,"url":"https:\/\/harchi90.com\/how-to-run-stable-diffusion-on-your-pc-to-generate-ai-images\/","url_meta":{"origin":80021,"position":3},"title":"How to Run Stable Diffusion on Your PC to Generate AI Images","date":"September 2, 2022","format":false,"excerpt":"Artificial Intelligence (AI) art is currently all the rage, but most AI image generators run in the cloud. Stable Diffusion is different \u2014 you can run it on your very own PC and generate as many images as you want. Here's how you can install and use Stable Diffusion on\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"An AI-generated magic gopher, artistic Egyptian vulture, and dramatic moonrise over a desert. Header image. ","src":"https:\/\/i0.wp.com\/www.howtogeek.com\/wp-content\/uploads\/2022\/09\/AI-HEader.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":45867,"url":"https:\/\/harchi90.com\/open-source-rival-for-openais-dall-e-runs-on-your-graphics-card\/","url_meta":{"origin":80021,"position":4},"title":"Open-source rival for OpenAI’s DALL-E runs on your graphics card","date":"August 15, 2022","format":false,"excerpt":"Image: Stable Diffusion Der Artikel kann nur mit aktiviertem JavaScript dargestellt werden. Bitte aktiviere JavaScript in deinem Browser und lade die Seite neu. OpenAI's DALL-E 2 is getting free competition. Behind it is an AI open-source movement and the startup Stability AI. Artificial intelligence that can generate images from text\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mixed-news.com\/en\/wp-content\/uploads\/2022\/08\/Stable-Diffusion-V1-Merged-Title-860x344.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":55303,"url":"https:\/\/harchi90.com\/uncensored-ai-art-model-prompts-ethics-questions-techcrunch\/","url_meta":{"origin":80021,"position":5},"title":"Uncensored AI art model prompts ethics questions \u2013 TechCrunch","date":"August 24, 2022","format":false,"excerpt":"A new open source AI image generator capable of producing realistic pictures from any text prompt has seen stunningly swift uptake in its first week. Stability AI's Stable Diffusion, high fidelity but capable of being run on off-the-shelf consumer hardware, is now in use by art generator services like Artbreeder,\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"fifu_image_url":"https:\/\/cdn.arstechnica.net\/wp-content\/uploads\/2022\/09\/compression_hero_3-760x380.jpg","_links":{"self":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts\/80021"}],"collection":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/comments?post=80021"}],"version-history":[{"count":0,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts\/80021\/revisions"}],"wp:attachment":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/media?parent=80021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/categories?post=80021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/tags?post=80021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}