Algorithm 1. Mitigating inappropriate concepts in image generation.
| 1: Input: text prompt embedding , inappropriate words embedding , unconditional embedding |
| 2: Output: Image without inappropriateness |
| 3: Initial randomized latent |
| 4: for do |
| 5: if then |
| 6: DM( ) |
| 7: Mtext, |
| 8: |
| 9: |
| 10: |
| 11: |
| 12: else |
| 13: DM( ) |
| 14: end if |
| 15: end for |
| 16: return |