【AI绘画】Alpha-VLLM 的 Lumina-Next:新一代图像生成器

简介

Lumina-Next-T2I 是在 Lumina-T2I 成功基础上发展起来的尖端图像生成模型。它采用了带有 2B 参数模型的 Next-DiT 和 Gemma-2B 文本编码器,推理速度更快,生成样式更丰富,并增强了多语言支持。

模型架构

Lumina-Next-T2I 的生成模型建立在 Next-DiT 骨干之上,文本编码器是 Gemma 2B 模型,而 VAE 则使用由 stabilityai 微调的 sdxl 版本。

  • 生成模型: Next-DiT
  • 文本编码器 Gemma-2B
  • VAE: sdxl-vae

新闻和更新

  • 2024 年 5 月 12 日,Lumina-Next-T2I 型号发布,为图像生成提供了更快更低的内存使用率。

安装

  1. 创建 conda 环境并安装 PyTorch 注意:您可能需要根据驱动程序版本调整 CUDA 版本
bash 复制代码
conda create -n Lumina_T2X -y
	conda activate Lumina_T2X
	conda install python=3.11 pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=12.1 -c pytorch -c nvidia -y
  1. 安装依赖
bash 复制代码
pip install diffusers huggingface_hub
pip install flash-attn --no-build-isolation
  1. Diffusers推理
bash 复制代码
from diffusers import LuminaText2ImgPipeline
import torch

pipeline = LuminaText2ImgPipeline.from_pretrained("/path/to/ckpt/Lumina-Next-SFT-diffusers", torch_dtype=torch.bfloat16).to("cuda")

# or you can download the model using code directly
# pipeline = LuminaText2ImgPipeline.from_pretrained("Alpha-VLLM/Lumina-Next-SFT-diffusers", torch_dtype=torch.bfloat16).to("cuda")

image = pipeline(prompt="Upper body of a young woman in a Victorian-era outfit with brass goggles and leather straps. "
                        "Background shows an industrial revolution cityscape with smoky skies and tall, metal structures").images[0]

鉴赏效果

A winter landscape with a frozen lake, snow-covered pine trees, and a small cabin with smoke coming out of the chimney.

An astronaut standing on a moonlit alien planet, with purple mountains and two large moons in the sky.

A rustic farmhouse kitchen with a wooden table, a bowl of fresh apples, and a cat curled up on a chair.

This is the Lumina output, and I wanted to show it because it was cartoony

感谢大家花时间阅读我的文章,你们的支持是我不断前进的动力。点赞并关注,获取最新科技动态,不落伍!🤗🤗🤗

相关推荐
喜欢吃豆7 分钟前
从指令到智能:大型语言模型提示词工程与上下文工程的综合分析
人工智能·语言模型·自然语言处理·大模型·提示词工程·上下文工程
Fuly102411 分钟前
prompt构建技巧
人工智能·prompt
XXX-X-XXJ15 分钟前
二:RAG 的 “语义密码”:向量、嵌入模型与 Milvus 向量数据库实操
人工智能·git·后端·python·django·milvus
艾醒(AiXing-w)22 分钟前
探索大语言模型(LLM):大模型微调方式全解析
人工智能·语言模型·自然语言处理
科兴第一吴彦祖25 分钟前
基于Spring Boot + Vue 3的乡村振兴综合服务平台
java·vue.js·人工智能·spring boot·推荐算法
姚瑞南33 分钟前
【AI 风向标】四种深度学习算法(CNN、RNN、GAN、RL)的通俗解释
人工智能·深度学习·算法
码农小懒哥43 分钟前
n8n vs Dify,看看它们各自的定位、优势、适用场景、限制
aigc·openai
渡我白衣1 小时前
深度学习入门(一)——从神经元到损失函数,一步步理解前向传播(上)
人工智能·深度学习·学习
补三补四1 小时前
SMOTE 算法详解:解决不平衡数据问题的有效工具
人工智能·算法
为java加瓦1 小时前
前端学AI:如何写好提示词(prompt)
前端·人工智能·prompt