当前位置: 首页 > wzjs >正文

东莞五金网站建设千网推软文推广平台

东莞五金网站建设,千网推软文推广平台,discuz应用,如何制作自己的二维码序 本文主要研究一下如何在腾讯云HAI-GPU服务器上部署DeepSeek Janus-Pro来进行文本生成图片 步骤 选择带GPU的服务器 到deepseek2025试用一下带GPU的服务器 下载Janus git clone https://github.com/deepseek-ai/Janus.git安装依赖 cd Janus pip install -e .安装gradi…

本文主要研究一下如何在腾讯云HAI-GPU服务器上部署DeepSeek Janus-Pro来进行文本生成图片

步骤

选择带GPU的服务器

到deepseek2025试用一下带GPU的服务器

下载Janus

git clone https://github.com/deepseek-ai/Janus.git

安装依赖

cd Janus
pip install -e .

安装gradio

pip install gradio

安装torch

pip uninstall torch torchvision torchaudio -y
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

运行示例

python demo/app_januspro.py --device cuda

输出示例如下

Python version is above 3.10, patching the collections module.
/root/miniforge3/lib/python3.10/site-packages/transformers/models/auto/image_processing_auto.py:594: FutureWarning: The image_processor_class argument is deprecated and will be removed in v4.42. Please use `slow_image_processor_class`, or `fast_image_processor_class` insteadwarnings.warn(
pytorch_model-00001-of-00002.bin: 100%|███████████████████████████████████████████████████████████████████████████████████████████| 9.99G/9.99G [09:34<00:00, 11.9MB/s]
pytorch_model-00002-of-00002.bin: 100%|███████████████████████████████████████████████████████████████████████████████████████████| 4.85G/4.85G [06:46<00:00, 11.9MB/s]
Downloading shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [16:21<00:00, 490.70s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.47s/it]
preprocessor_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 346/346 [00:00<00:00, 3.40MB/s]
Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.48, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with `use_fast=False`.
tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 285/285 [00:00<00:00, 2.94MB/s]
tokenizer.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.72M/4.72M [00:00<00:00, 18.1MB/s]
special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 344/344 [00:00<00:00, 2.93MB/s]
You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message.
processor_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 210/210 [00:00<00:00, 2.00MB/s]
Some kwargs in processor config are unused and will not have any effect: ignore_id, add_special_token, num_image_tokens, mask_prompt, sft_format, image_tag. 
* Running on local URL:  http://127.0.0.1:7860
* Running on public URL: https://xxxxx.gradio.liveThis share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)

可以访问这个public URL

使用示例

在这里插入图片描述

大概需要等120s左右可以生成,app.py使用的模型deepseek-ai/Janus-1.3B

小结

自己部署实际还是挺多麻烦的(最开始是在mac上跑,遇到CUDA_HOME问题,后来是找了cpu版本的,遇到没有GPU的问题,最后用了一个带GPU的服务器才跑成功),会遇到各种依赖问题,还有GPU等配置问题,另外就是网络访问问题,所以实际折腾下来就是,如果没有其他特殊需求,还是乖乖用云服务的api吧。

doc

  • deepseek2025
  • DeepSeek 多模态大模型Janus-Pro-7B,本地部署教程!支持图像识别和图像生成
http://www.dtcms.com/wzjs/91685.html

相关文章:

  • 西安自适应网站建设今日新闻最新10条
  • wordpress桌面应用程序深圳网站营销seo电话
  • 网站后台登录怎么做的淘宝数据查询
  • 小语种网站建设要点seo优化一般包括哪些
  • 计算机网站开发毕业论文题目太原seo网站优化
  • 找做网站技术人员百度百家号怎么赚钱
  • 企业网站可以自己做搜索引擎广告推广
  • php网站做语言包石家庄网站优化
  • 网站服务公司业务范围包括网站制作流程图
  • 企业策划书模板seo搜索培训
  • 河北省镇政府做网站吗自己怎么优化网站排名
  • 做网站 就上凡科建站东莞网站建设做网站
  • 如何选择靠谱的网站建设公司seo专员工作内容
  • 做网站的公司不会设计网站优化最为重要的内容是
  • tp 网站建设源码指数基金什么意思
  • 政府门户网站设计企业在线培训系统
  • 广东做网站的公司微信推广朋友圈广告
  • 推广链接网站网络营销与管理专业是干什么的
  • 网站建设规划书总结怎么写网站如何快速收录
  • 上海软件外包公司名单珠海网站seo
  • 网站建设合作协议百度seo关键词
  • 济南建站公司电话合肥seo服务商
  • ios开发游戏优化软件
  • 只做英文网站 域名有什么要求企业营销策划书如何编写
  • 网站制作那家便宜点击器
  • 动画网站制作百度 seo 工具
  • 网站建设与管理案例教程40个免费网站推广平台
  • 六安人论坛最新招聘信息科学新概念seo外链平台
  • 用html建设网站优化设计三年级上册语文答案
  • 营销型网站十大参考标准百度关键词优化首选667seo