鱼C论坛

 找回密码
 立即注册
查看: 183|回复: 4

[吹水] 简单文字生成图片

[复制链接]
发表于 2025-3-18 07:47:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
pollinations-ai 这个网站超好玩,简单文字生成漂亮图片,不用注册和登录。AI 真的强大呀!
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2025-3-19 02:30:42 | 显示全部楼层
下次配个图片看看
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-3-19 15:54:06 | 显示全部楼层

                               
登录/注册后可看大图
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2025-3-21 17:58:20 | 显示全部楼层
捕获网址:https://pollinations.ai/
上面提供的python调用:

  1. # Python code example for downloading an image

  2. import requests

  3. def download_image(image_url):
  4.     # Fetching the image from the URL
  5.     response = requests.get(image_url)
  6.     # Writing the content to a file named 'image.jpg'
  7.     with open('image.jpg', 'wb') as file:
  8.         file.write(response.content)
  9.     # Logging completion message
  10.     print('Download Completed')

  11. # Image details
  12. prompt = 'A beautiful landscape'
  13. width = 1024
  14. height = 1024
  15. seed = 42 # Each seed generates a new image variation
  16. model = 'flux' # Using 'flux' as default if model is not provided

  17. image_url = f"https://pollinations.ai/p/{prompt}?width={width}&height={height}&seed={seed}&model={model}"

  18. download_image(image_url)


  19. # Using the pollinations pypi package

  20. ## pip install pollinations

  21. import pollinations as ai

  22. model_obj = ai.Model()

  23. image = model_obj.generate(
  24.     prompt=f'A beautiful landscape {ai.realistic}',
  25.     model=ai.flux,
  26.     width=1024,
  27.     height=1024,
  28.     seed=42
  29. )
  30. image.save('image-output.jpg')

  31. print(image.url)
复制代码

评分

参与人数 1荣誉 +2 鱼币 +2 收起 理由
ydwb + 2 + 2 鱼C有你更精彩^_^

查看全部评分

小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-3-22 07:42:51 | 显示全部楼层
中文提示词也行,可以多次生成,是原始生成的,真好玩!
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-4-19 09:55

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表