添加图片注释,不超过 140 字(可选)

🙋魔搭ModelScope本期社区进展:

📟923个模型:In-Context-LoRA、omnivision-968M、Pixtral-Large-Instruct-2411、Mistral-Large-Instruct-2411等;

📁85个数据集:LVBench、LongVideoBench、smoltalk等;

🎨35个创新应用:Qwen2.5-Turbo-1M-Demo、omnivlm-dpo-demo、魔搭答疑小助理等;

📄 7 篇内容:

  • FLUX.1 Tools 全家桶开源!文末附一键ComfyUI启动链接

  • 浪潮信息 Yuan-embedding-1.0 模型登顶MTEB榜单第一名

  • 直播预告 | Qwen2.5-Coder 开源报告解读

  • 阿里通义推出SmartVscode插件,自然语言控制VS Code,轻松开发应用,核心技术开源!

  • 10万奖金!通义千问Qwen技术应用有奖征文

  • In-Context LoRA实现高效多任务图像生成,开启视觉创作新篇章

  • 冬天到了,用OmniGen生成一个温暖的拥抱

01精选模型

In-Context-LoRA

通义实验室提出的In-Context LoRA框架,通过增强现有文本到图像模型的上下文学习能力,实现了无需架构修改的多任务高质量图像生成,简化了训练过程,减少了对标注数据的需求,并在故事板生成、字体设计、家居装饰等多个实际应用场景中展现出色的表现,同时支持条件图像生成,为未来模型开发提供了新思路。

模型链接:

https://modelscope.cn/models/iic/In-Context-LoRA

代码示例:

环境安装:安装comfyui和对应的定制化节点

# #@title Environment Setup

from pathlib import Path

OPTIONS = {}
UPDATE_COMFY_UI = True  #@param {type:"boolean"}
INSTALL_COMFYUI_MANAGER = True  #@param {type:"boolean"}
INSTALL_CUSTOM_NODES_DEPENDENCIES = True  #@param {type:"boolean"}
INSTALL_ComfyUI_CustomNodes = True #@param {type:"boolean"}
INSTALL_x_flux_comfyui = True  #@param {type:"boolean"}
OPTIONS['UPDATE_COMFY_UI'] = UPDATE_COMFY_UI
OPTIONS['INSTALL_COMFYUI_MANAGER'] = INSTALL_COMFYUI_MANAGER
OPTIONS['INSTALL_CUSTOM_NODES_DEPENDENCIES'] = INSTALL_CUSTOM_NODES_DEPENDENCIES
OPTIONS['INSTALL_ComfyUI_CustomNodes'] = INSTALL_ComfyUI_CustomNodes
OPTIONS['INSTALL_x_flux_comfyui'] = INSTALL_x_flux_comfyui

current_dir = !pwd
WORKSPACE = f"{current_dir[0]}/ComfyUI"



%cd /mnt/workspace/

![ ! -d $WORKSPACE ] && echo -= Initial setup ComfyUI =- && git clone https://github.com/comfyanonymous/ComfyUI
%cd $WORKSPACE

if OPTIONS['UPDATE_COMFY_UI']:
  !echo "-= Updating ComfyUI =-"
  !git pull


if OPTIONS['INSTALL_COMFYUI_MANAGER']:
  %cd custom_nodes
  ![ ! -d ComfyUI-Manager ] && echo -= Initial setup ComfyUI-Manager =- && git clone https://github.com/ltdrdata/ComfyUI-Manager
  %cd ComfyUI-Manager
  !git pull

if OPTIONS['INSTALL_ComfyUI_CustomNodes']:
  %cd ..
  !echo -= Initial setup ComfyUI_Comfyroll_CustomNodes =- && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git
  !echo -= Initial setup ComfyUI_rgthree_comfy =- && git clone https://github.com/rgthree/rgthree-comfy.git
  !echo -= Initial setup ComfyUI_JPS =- && git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git
  !echo -= Initial setup ComfyUI_Custom_Scripts =- && git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git
  !echo -= Initial setup ComfyUI-KJNodes =- && git clone https://github.com/kijai/ComfyUI-KJNodes.git



if OPTIONS['INSTALL_x_flux_comfyui']:
  !echo -= Initial setup x-flux-comfyui =- && git clone https://github.com/XLabs-AI/x-flux-comfyui.git

if OPTIONS['INSTALL_CUSTOM_NODES_DEPENDENCIES']:
  !pwd
  !echo "-= Install custom nodes dependencies =-"
  ![ -f "custom_nodes/ComfyUI-Manager/scripts/colab-dependencies.py" ] && python "custom_nodes/ComfyUI-Manager/scripts/colab-dependencies.py"

!pip install spandrel

模型下载:下载flux和in-context lora

#@markdown ###Download standard resources
%cd /mnt/workspace/ComfyUI
### FLUX1-DEV
# !modelscope download --model=AI-ModelScope/FLUX.1-dev --local_dir ./models/unet/ flux1-dev.safetensors
!modelscope download --model=AI-ModelScope/flux-fp8 --local_dir ./models/unet/ flux1-dev-fp8.safetensors

### clip
!modelscope download --model=AI-ModelScope/flux_text_encoders --local_dir ./models/clip/ clip_l.safetensors
!modelscope download --model=AI-ModelScope/flux_text_encoders --local_dir ./models/clip/ t5xxl_fp8_e4m3fn.safetensors

### vae
!modelscope download --model=AI-ModelScope/FLUX.1-dev --local_dir ./models/vae/ ae.safetensors


### lora
#!modelscope download --model=FluxLora/flux-koda --local_dir ./models/loras/ araminta_k_flux_koda.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ film-storyboard.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ font-design.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ couple-profile.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ home-decoration.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ portrait-illustration.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ portrait-photography.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ ppt-templates.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ sandstorm-visual-effect.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ sparklers-visual-effect.safetensors
!modelscope download --model=iic/In-Context-LoRA --local_dir ./models/loras/ visual-identity-design.safetensors

运行工作流,使用cloudflare运行工作流

!wget "https://modelscope.oss-cn-beijing.aliyuncs.com/resource/cloudflared-linux-amd64.deb"
!dpkg -i cloudflared-linux-amd64.deb

%cd /mnt/workspace/ComfyUI
import subprocess
import threading
import time
import socket
import urllib.request

def iframe_thread(port):
  while True:
      time.sleep(0.5)
      sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      result = sock.connect_ex(('127.0.0.1', port))
      if result == 0:
        break
      sock.close()
  print("\nComfyUI finished loading, trying to launch cloudflared (if it gets stuck here cloudflared is having issues)\n")

  p = subprocess.Popen(["cloudflared", "tunnel", "--url", "http://127.0.0.1:{}".format(port)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  for line in p.stderr:
    l = line.decode()
    if "trycloudflare.com " in l:
      print("This is the URL to access ComfyUI:", l[l.find("http"):], end='')
    #print(l, end='')


threading.Thread(target=iframe_thread, daemon=True, args=(8188,)).start()

!python main.py --dont-print-server

Notebook分享链接:https://modelscope.cn/notebook/share/ipynb/a4c365ec/ComfyUI_incontexlora.ipynb

工作流效果:

添加图片注释,不超过 140 字(可选)

更多详情请看教程文章:

In-Context LoRA实现高效多任务图像生成,开启视觉创作新篇章

Yuan-embedding-1.0

Yuan-embedding-1.0 是浪潮信息专门为中文文本检索任务设计的嵌入模型,采用bert-large模型作为基础模型,模型参数量为326M,最大输入长度为 512 个 token,使用模型最后一层输出所有token的平均值作为Embedding向量。该模型在中文语义向量评测基准——C-MTEB的Retrieval任务中荣获第一名,为用户加速基于大模型的智能应用创新提供了有力支持。

模型链接:

https://modelscope.cn/models/IEITYuan/Yuan-embedding-1.0

代码示例:

   from sentence_transformers import SentenceTransformer
   from modelscope import snapshot_download

   model_dir = snapshot_download('IEITYuan/Yuan-embedding-1.0')

   model = SentenceTransformer(model_dir)
   
   sentences = [
       "这是一个样例-1",
       "这是一个样例-2",
   ]
   embeddings = model.encode(sentences)
   similarities = model.similarity(embeddings, embeddings)
   print(similarities)

Mistral-Large-Instruct-2411

Mistral-Large-Instruct-2411是由Mistral AI近期推出的 123B参数大型语言模型,具有最先进的推理、知识和编码能力,通过更好的长上下文、函数调用和系统提示扩展了Mistral-Large-Instruct-2407

  • 多语言设计:支持数十种语言,包括英语、法语、德语、西班牙语、意大利语、中文、日语、韩语、葡萄牙语、荷兰语和波兰语。

  • 精通编码:接受过 80 多种编码语言的培训,例如 Python、Java、C、C++、Javacsript 和 Bash。还接受过更具体的语言的培训,例如 Swift 和 Fortran。

  • 以代理为中心:具有本机函数调用和 JSON 输出的最佳代理功能。

  • 高级推理:最先进的数学和推理能力。

  • Mistral 研究许可证:允许非商业用途的使用和修改。

  • 上下文:一个大的 128k 上下文窗口。

  • 强大的上下文遵守性:确保 RAG 和大型上下文应用程序的强大遵守性。

  • 系统提示:保持强有力的遵守和支持,以提供更可靠的系统提示。

模型链接:

https://modelscope.cn/models/mistral-community/Mistral-Large-Instruct-2411

02数据集推荐

LVBench

LVBench是一个可能专注于生活方式识别和视觉基准测试的计算机视觉数据集,用于评估和比较不同模型在图像分类、目标检测或语义分割等任务上的性能。

数据集链接:

https://modelscope.cn/datasets/AI-ModelScope/LVBench

LongVideoBench

LongVideoBench是一个创新的问答基准,专门设计来评估大型多模态模型(LMM)在处理长达一小时的复杂视频语言交错输入时的长期多模态理解能力,通过包含3,763个视频和6,678个人工注释的多项选择题,它提出了引用推理新任务,挑战模型从冗长输入中准确检索和推理详细信息,成为评估长篇视频理解能力的重要工具。

数据集链接:

https://modelscope.cn/datasets/AI-ModelScope/LongVideoBench

smoltalk

一个专为 LLM 的监督微调 (SFT) 而设计的合成数据集。它用于构建SmolLM2-Instruct系列模型,包含 100 万个样本。

数据集链接:

https://modelscope.cn/datasets/AI-ModelScope/smoltalk

 

03精选应用

Qwen2.5-Turbo-1M-Demo

Qwen-Turbo原生支持长达100万个token的输入长度,可以上传文档进行问答(例如,pdf、docx、pptx、txt、html格式的文件)。

模型集合demo体验:

https://modelscope.cn/studios/Qwen/Qwen2.5-Turbo-1M-Demo

omnivlm-dpo-demo

支持上传图片并提出相关问题,模型将分析图片并为您的问题提供详细答案。

体验直达:

https://modelscope.cn/studios/NexaAIDev/omnivlm-dpo-demo

魔搭答疑小助理(beta)

专注回答魔搭平台各类使用问题

体验直达:

https://modelscope.cn/studios/AI-ModelScope/modelscope_copilot_beta

04社区精选文章

Logo

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!

更多推荐