Advanced Tips on Glazing and Glaze Intensity
Welcome! If you're reading this, we assume that you already have some familiarity with running Glaze or Webglaze on your art, and are looking for more tips on how to make it work better for your art style. This short document dives a bit into what intensity (and render) actually mean, why do you sometimes get errors when glazing specific pieces of art, and what you can do about it.
What is Intensity and Render Time. First, let's talk about what intensity and render actually mean. These are the two knobs you can adjust on the downloadable Glaze app. To begin, recall that Glaze is looking for a set of coordinate pixel changes, which when applied together to your art, makes it look to an AI model like it is done in a dramatically different art style from your own. Intensity is the level of perturbation you allow Glaze to add to your art, or intuitively, how much noise are you comfortable with Glaze adding to your art. Higher intensity means potentially more visible changes to your art from Glazing. Now, note that there are lots of combinations of pixel pattern changes that can satisfy the dual requirements of a) changing the AI's view of this artwork's style, and b) staying within your noise budget (intensity). When you run Glaze, Glaze is searching the space of potential pixel patterns for any solution that matches these two constraints, kinda like solving a really hard pair of algebra equations. Render time, is actually the amount of time you allow the Glaze program to run while performing this search. The longer the render time, the more likely it is that Glaze will find a workable Glaze result that falls within your budget and provides sufficient protection.
But because there is no deterministic way to solve this difficult pair of equations (no determined formula to follow to get the same answer every time), instead Glaze searches and finds the best solution within the rendering time. The higher the intensity, the more viable answers there are. The longer the render time, the more likely you are to find one of the viable answers (assuming there is one). So successful Glazing a particular image depends a bit on luck too!
What does it mean when you get an error from Glaze? It means that within the render time you allowed, the best solution that Glaze/webglaze found did not provide strong enough protection. It doesn't mean there is no solution. It just means you didn't find it within the allowed time on this particular try. So if you think the intensity you get Glaze was good enough, re-running Glaze with the same intensity can give you a good result even if it failed with an error on the last try. Of course if your intensity value is too low, then there might be VERY FEW possible Glaze results that give you enough protection, and your likelihood of finding a good result with enough protection in any reasonable running time (render quality) might be very very low. So you might need to run Glaze quite a few times to get lucky and find one of those good results.
So how do I choose the right intensities for Glaze/Webglaze? When you run Glaze the app, you have the option of trying very low intensity values (to minimize visible changes in your art) and turn Render quality to max. That gives you the best shot to find a workable Glaze that produces the best (minimal visible) Glaze on your art. To avoid overly aggressive run times on Webglaze, we set the default render quality to medium and do not allow users to modify it. So if you're running Webglaze, you might need to run a couple of times at a particular intensity before giving up on that intensity level.
In general, we recommend that you start with a low intensity value for any piece of art, and see if it succeeds. If it fails with a "not enough protection" error, then move the intensity higher and try again (a couple of times). If any of the Glaze attempts work, then that result is strong enough. If your art has flat/clean colors like black & white comics, manga, anime or cartoons, or maybe sharp details like a high resolution photo, then it is even more important to start at a low intensity value (5 or 10) and move higher until you get a successful result. Very very rarely do we see an image that cannot be Glazed with intensity at or lower than 40, and that's why we set max intensity on Webglaze to 40.
Hope that helps! And as usual, feel free to email us on the links on this webpage or DM us on twitter.