Like 99,99% of the DL models, the Stable Diffusion was mainly trained with English texts. It is therefore necessary to do prompt engineering in English (or use a translator to obtain a prompt in English).
But maybe it is not useful for some languages either because of their linguistic proximity, or because texts in these languages were used when training the model (or one of its components as CLIP).
To check it in Portuguese, I took the prompts in English from the notebook stable_diffusion.ipynb from fastai, I translated them via Google Translate and I ran the same code. Here are the results.
Apart from the negative prompt which not only did not work (the blue remained) but also generated a different image, the results are quite good compared to the same images generated with an English prompt.
It would be interesting to test all the other possibilities of Stable Diffusion with texts in Portuguese and to post the results and comments.
Another post on this subject of Stable Diffusion in a language other than English: Share your work here ✅ (Part 2 2022) - #15
# English prompt: a photograph of an astronaut riding a horse prompt = "uma fotografia de um astronauta andando a cavalo" pipe(prompt).images
# English prompt: Labrador in the style of Vermeer torch.manual_seed(1000) prompt = "Labrador no estilo de Vermeer" pipe(prompt).images
# English prompt: blue torch.manual_seed(1000) pipe(prompt, negative_prompt="azul").images
# English prompt: Wolf howling at the moon, photorealistic 4K torch.manual_seed(1000) prompt = "Lobo uivando para a lua, 4K fotorrealista" images = pipe(prompt=prompt, num_images_per_prompt=3, init_image=init_image, strength=0.8, num_inference_steps=50).images image_grid(images, rows=1, cols=3)
# English prompt: Oil painting of wolf howling at the moon by Van Gogh torch.manual_seed(1000) prompt = "Pintura a óleo de lobo uivando para a lua por Van Gogh" images = pipe(prompt=prompt, num_images_per_prompt=3, init_image=init_image, strength=1, num_inference_steps=70).images image_grid(images, rows=1, cols=3)