import paddle
from paddlemix.appflow import Appflow
paddle.seed(42)
task = Appflow(app="text2image_generation",
models=["stabilityai/stable-diffusion-xl-base-1.0"]
)
prompt = "a photo of an astronaut riding a horse on mars."
result = task(prompt=prompt)['result']
效果展示