Mask AI - Ps 2021 Plugin - Not Returning Mask to Layer

I spent quite a while creating a mask for the Brooklyn Bridge (to be used in creating a composite w/in Ps 2021).

Did all my usual quality of mask reviews & refining while still in MAI plugin (masked object on white color).

Accepted to send my MAI-created mask back to the Ps layer stack (as a Transparency - so it could be overlaid on another image).

It generated an Error Msg instead. Did Not send the mask to the layer stack. All the masking time down the drain.

I installed the latest gen of MAI (1.3.6) from the full Win installer that’s on the Topaz Downloads page to my 64 bit Win 10 Pro PC earlier today. That’s what I used when this happened… needless to say, Ps was not open during the install. Nor were any other programs/apps. As usual, I launched the standalone vers., checked the Prefs then closed it before launching Ps and trying to use it as a plugin there.

Snip of what I see in Ps 2021 post accepting my MAI mask (from the MAI plugin).

When you say “as a transparency” what do you mean? The concept of saving as a transparency in Mask is not a mask but the mask applied to the image.

I usually do my cleanup in MAI on a white (or, black - depending on the subject) color background.

When I hit accept/apply to send my mask back to a Ps layer stack MAI prompts me & says “Transparency or Composite”. I choose Transparency because I want my image/mask to go back to Ps w/out the white color background.

In the past that gave me my masked image on a Ps layer w/an accompanying BW layer mask.

With the newest MAI that didn’t happen. I just got that error msg I posted.

At one stage in MAI’s devel I remember having to add a mask b4 entering the MAI plugin. But that was corrected and I haven’t had to do that for a while. This is a new development to get that error msg.

Does that answer your question, Don?

Sure does, you sent a Mask over and that wont accept a transparency.

You need to have these turned off if you want a layer with transparency where you can later create a mask from the transparency in PS:


I’ll try that but it seems counter-intuitive to turn off new layer…and save to layer mask.

I want what’s sent back to Ps from the MAI plugin put on a new layer above what I’m working on. On that new layer should be the masked image thumbnail & to its right its BW mask that MAI creates.

I don’t want the launch layer (for lack of a better term) written onto by what comes back from the plugin.

You just need to turn off Save to Layer Mask if you want to do it that way. Leave Auto-Create Layer on.

Then you cannot return as a transparency just as a mask if your using a background in the app. So select Apply as Transparent not Composite like this:


And this will return:


If that is what you are doing you may have another issue that Support needs to look at.

Yes. That was what I did. Applied as Transparent. B/c otherwise the wht background would have been returned too. I only use that b/c the checkerboard is big & darker than I can make it in Ps (where it virtually disappears). Returning a wht bkgrnd would defeat creating a mask to isolate my objects. Will try again tomorrow. It’s late here now.


Okay, I just had a chance to try it again today.

I didn’t make any Prefs changes to what I was using. Both the settings you show in your snip in the #3 post above are turned on for me. (So to speak… not quite a When Harry Met Sally diner scene).

Today the Ps 2021 MAI plugin returned both the thumbnail and a BW mask to the layer above my “launch” layer (as desired!) okay. Fingers crossed that continues to work.

That said, now I’m having different issues (with diff images I’ve tried). Sigh. After my initial AI mode mask, I switch to Contrast mode for the more egregious mask refinements before I use refinement sliders. A couple bad things are happening (at least one of which is a step backward in the quality of the program and its ‘learning’ - IMO).

1- Once I’ve switched to the Contrast mode and make some red or green brush cleanups on the KEEP preview, MAI has regressed to some seriously bad "mess’ reconstitution and mess moving around bhvr. It is bringing back a ton of fringy horrible original details that the AI mode had removed and had made a much cleaner mask with. [If I recall, we were advised to switch to Contrast mode for that 2nd -> n tier cleanup]. This mess recreation and springing up with more cleanup iterations is more like numbers of gens ago of MAI.

2- Related to #1, there is no way (certainly not in the Ps plugin) to ‘Undo’ that newly created mess and try a diff approach/mode w/out having to completely Reset and start all over. Pardon my delicacy (I know my mother would give me a look), but that sucks! I cannot use CTRL + Z to step back. Nor can I use “Undo” and “Redo” swirly arrows at top right - they are greyed out. They should most definitely be working and should take me back to before I hit update using the Contrast mode. So I can try again with AI mode.

When you use MAI as plugin (I realize you’re more of an Affinity dude than a Ps dude) are the Undo and Redo buttons/swirls active for you? Or, do you see them greyed out also? It may just be something to be fixed in Ps. That is definitely not a function that one would handle back in Ps. The mask has to be refined and may need some do-overs before it gets back there.

I’m not even using a complex image to mask around. It’s a very straightforward, geometrically clean lantern (for compositing).

You sometimes come up with fixes so I’m asking you 1st. Also, I don’t particularly like my posts being moved around. So if that is indeed an “issue” (aka, bug or product fix need) where is the appropriate posting site. If it’s plugin prod design it’s not particularly a tech spt issue, it’s a bug that should be fixed for all. IMO.

OK I tested it for you and it seems there is an issue with Undo when you DON’T use Auto Compute Mask.

But there is a solution, in my case I don’t use Auto for the compute mask but what you can do is the following (note using it from PS but it doesn’t matter what the host is):

  • Compute the mask the first time (this cannot be un-done anyway) using AI Mask Mode
  • Then when you switch to Contrast Mask Mode, switch on Auto Compute Mask and brush a small Red/Green in one of the computed areas.
  • Switch off Auto Compute Mask, Compute the Mask and then the Undo will work for the next adjustment

So if you follow that sequence the Undo will commence working in Contrast Mask Mode.

Also, test it out and see if that works for you then raise a technical support request … you are the first to see this anomaly in the Undo as most would use Auto Compute Mask :smile:

Note that even though this may be considered a ‘bug’ by some, it really is a issue in Undo when switching modes where the Undo isn’t reset for the mode switch … error by omission and only for Manual Compute. Note that just about everything can be considered a ‘bug’ but typically a bug causes an application to stop working (i.e. cannot execute).

1 Like


Well, I knew you’d figure it out…

Geez. Do I have to stand on one foot and only try to undo a flawed mask during a full moon too?!?

That is very wonky. And, certainly not elegant coding. Or, right.

I will try it then if it stays wonky (or only works as you suggested) I’ll raise a Spt request. My def for a “Bug” is anything that is poorly designed - incl. a feature not working as it should (for more than just little 'ole me & my less than high-end gaming PC).

Consistent crashes goes beyond bug (IMO) to complete failure. Which reminds me - I just watched the last 4 electoral voters in Hawaii complete their paperwork live streaming… Phew!

1 Like

Well, that worked.

But it sure isn’t elegant or intuitive… I’m gonna report it. It needs a fix! :bug:

1 Like

I think what you are experiencing when you change from AI to contrast is similar to what I posted about here. Mask AI - Cleaning up masks a pain

I did raise a Support ticket about not being able to change from AI to contrast without a re-compute which produces a significantly poorer mask. I’ve since had some feedback indicating it has been brought the attention of the developers. No guarantees though.

Yes, sounds like you’ve (so I have to assume many others too…) experienced at least 50% of what I posted about. The Contrast Mode creates more mess on re-compute 50% of my post.

I don’t know if you’ve seen the other 50% of what I posted also. The part where Undo/Redo is greyed out and unusable. Certainly in the plugin implementation - which is my sole use method. Even after invoking the Mandalorian to get Undo to appear again, Redo remains greyed out (plugin) …

I’ve today downloaded and installed v 1.3.7 which Support advised me would fix a problem with Cancel I had reported, and iI can confirm that it has fixed that.

Whilst the undo issue you posted about is not mentioned in the change notes, it does appear to be working as I would expect in this latest version.

My sequence (using as a plugin from Affinity Photo is:

  1. Do an auto detect subject, then use mask brush tool to tweak the initial trimap
  2. Do AI Compute mask
  3. With Auto compute mask left On, select Contrast Mode
  4. Do a manual Compute Mask
  5. Make correction with keep brush (let it auto compute)
  6. Make correction with Cut brush (let it auto compute)
  7. Edit pull down (only Undo available) ->Undo … Cut correction from step 6 reversed
  8. Edit pull down (both Undo and Redo available) ->Undo … Keep correction from step 5 reversed
  9. Edit pull down (only Redo available) ->Redo … Keep correction from step 5 reapplied
  10. Edit pull down (both Undo and Redo available) ->Redo … Cut correction from step 6 reapplied

Just on another note. The brush sizing appears to be much improved in the 1.3.7 version

For Topaz Tech Spt ref:

Here’s what I see in Ps 2021 plugin (MAI 1.3.7) wrt Undo & Redo buttons greyed out.

They should be active regardless of whether a user is in manual or auto-update setting. And, users shouldn’t have to turn auto-update off then on to have those features kick in either:

As plugin from Affinity Photo, both Undo and Redo buttons are working. Using the recipe I posted before, but using the buttons instead of the pull down menu, the undo button becomes active at step 7 and both undo and redo are active at step 8.

The screen shot shows both buttons active at step 8.

The buttons are also both working when its used as a plugin with ACDsee Photo Studio Ultimate 2021

1 Like