@Ignacio's is strictly correct, albiet biased towards a specific shell instead of suggesting a POSIX standard shell....
However, what you're trying to do is much more efficiently done with a filter. I.e. you're trying to find a way to have find
transform each pathname it would be about to print, but that causes find to fork a shell process for every filename it matches!
To be more efficient you should instead try to find a way to transform the list of pathnames that find
might produce into the form you would like to see them in, and to do so with only one additional process.
For example if all you want to see is the base name (i.e. the final filename component) of each pathname then you can do that trivially with a (relatively) simple sed
command that you could pipe your find
output through to produce the desired list of filenames:
sed '/^[^/]*$/p;s/.*\/\([^/]*\)$/\1/p'