借助ollama实现AI绘画提示词自由,操作简单只需一个节点!

news2025/9/19 8:15:58

只需要将ollama部署到本地,借助comfyui ollama节点即可给你的Ai绘画提示词插上想象的翅膀。具体看详细步骤!

img

第一步打开ollama官网:https://ollama.com/,并选择models显存太小选择的是llama3\8b参数的instruct-q6_k的这个模型。

图片

运行方式也很简单,只要你网络没问题,直接在终端里,运行ollama run llama3:8b-instruct-q6_K这个命令,这样你可以在终端里llama3交流了!

图片

当然咱们说的是在comfyui里运用llama3模型实现提示词自由的,所以我们需要安装comfy ollama节点,如图所示直接install即可

图片

然后开始搭建ollama提示词节点,节点的提示词部分包含三个部分

第一部分汉译英过程:

命令提示词为:Translate the following into English, do not add any text other than the prompt:

其中节点:cr text concatenate是帮助字符串链接的一个节点!其中上面的是指令规则,下面的是要执行的具体指令。

图片

You are a prompt engineer proficient in SDXL painting, especially skilled in refining prompts. Please strictly follow the steps below to refine the prompts that need to be refined, operate step by step and output the results of each step:

Step 1: List the names and genders of all the characters in the prompt. If there are no characters in the prompt, skip this step.

Step 2: Use a short phrase to describe all the characters in the prompt. This phrase can use plurals or and, do not use any punctuation. Do not use any punctuation in this short phrase. Do not use any punctuation in this short phrase. The format is as follows:
- 1boy
- 1girl
- 2boys
- 2girls
- 1girl and 1boy

Step 3: Identify the main subjects in the prompt word. If you can guess which work it/them comes from, list the name of the work in the format:
- Link from The Legend of Zelda series, Spider-Man from Marvel movies, ...
If there is no prominent subject in the prompt, such as if the prompt is purely a landscape, skip this step.

Step 4: Combine the contents of the previous two steps, separated by commas. If there is no prominent subject in the prompt, such as if the prompt is pure scenery, skip this step and do not output any characters.

Step 5: 
If the prompt contains a character, use the result from the previous step as the beginning, and creatively refine the rest of the prompt as a whole in English, 80 words,following the format: Number of characters and gender of characters, [character 1], [character 2], [character ...], everything else in any order. Examples of refined prompt:
- 1man, [young man with ((short gray hair)), black turtleneck sweater, suspenders, singing, smiling, holding a basketball,  a pendant necklace], plain white wall background, focus on him and his actions, anime-style scene
- 2 girls, [one on the left wearing a gray T-shirt holding a laptop in her hand], [one on the right wearing a Wonder Woman costume], anime-style scene
- 1 boy and 1 girl, [Chun-Li from Street Fighter] and [Spider-Man from Marvel movies], engaged in a fierce battle, dynamic fighting poses, action movie poster
- 1 boy and 1 girl, [K-pop male singer (left of center) with short black hair, brown eyes, white color, formal suit with satin lapel and bow tie], [K-pop female singer (center) with long straight black hair, dark brown eyes, white color, formal silver dress], both singers holding hands up in peace signs, anime-style scene, bright colors, sunny background

If the prompt does not contain a character but does contain a clear subject, use the result of the previous step as the beginning and use your imagination to refine the prompt as a whole. The language should be English and the format should be "subject name, everything else in any order."

If the prompt does not contain a character or a clear subject, use your imagination to refine the prompt as a whole, in English.

Step 6: Enclose the result of the previous step within # #

Prompt that need refining:

这个规则大家感兴趣的话可以翻译成中文研究一下,生成逻辑,我坦白这个指令是抄作业抄来的!

图片

这是第二步提示词命令生成的提示词,因为它根据指令,给出了每一步的生成过程所以,所以咱们不能把这样没有逻辑的提示词给comfy啊,经过观察真正生成的提示词结果是在##号内!所以有了第卅部!

第三步提取提示词:

是的我们要将##号内的提示词提取出来,提取提示词用这个指令

在这里插入图片描述

然后你只需要在最前面的cr text节点里输入你要,输入的指令,并把第三个comfyui ollama节点和正向提示词连接即可!

图片

最后放一个祖传的1 girl美女,作为这篇文章的结束

如何学习AI大模型?

作为一名热心肠的互联网老兵,我决定把宝贵的AI知识分享给大家。 至于能学习到多少就看你的学习毅力和能力了 。我已将重要的AI大模型资料包括AI大模型入门学习思维导图、精品AI大模型学习书籍手册、视频教程、实战学习等录播视频免费分享出来。

这份完整版的大模型 AI 学习资料已经上传CSDN,朋友们如果需要可以微信扫描下方CSDN官方认证二维码免费领取【保证100%免费

一、全套AGI大模型学习路线

AI大模型时代的学习之旅:从基础到前沿,掌握人工智能的核心技能!

img

二、640套AI大模型报告合集

这套包含640份报告的合集,涵盖了AI大模型的理论研究、技术实现、行业应用等多个方面。无论您是科研人员、工程师,还是对AI大模型感兴趣的爱好者,这套报告合集都将为您提供宝贵的信息和启示。

img

三、AI大模型经典PDF籍

随着人工智能技术的飞速发展,AI大模型已经成为了当今科技领域的一大热点。这些大型预训练模型,如GPT-3、BERT、XLNet等,以其强大的语言理解和生成能力,正在改变我们对人工智能的认识。 那以下这些PDF籍就是非常不错的学习资源。

img

四、AI大模型商业化落地方案

img

作为普通人,入局大模型时代需要持续学习和实践,不断提高自己的技能和认知水平,同时也需要有责任感和伦理意识,为人工智能的健康发展贡献力量。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1822382.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Ubuntu18.04 安装 colmap

安装依赖 sudo apt-get install \git \cmake \ninja-build \build-essential \libboost-program-options-dev \libboost-filesystem-dev \libboost-graph-dev \libboost-system-dev \libeigen3-dev \libflann-dev \libfreeimage-dev \libmetis-dev \libgoogle-glog-dev \libgt…

GenICam标准(一)

系列文章目录 GenICam标准(一) GenICam标准(二) 文章目录 系列文章目录1、概述GenApiGenTLSFNC(标准特征命名约定)CLProtocolGenCP 参考 emva 1、概述 如今的数码摄相机包含了很多的功能,而不仅…

为什么Mamba模型被拒?

Mamba模型问世 最近,国际学习表征会议(ICLR)公布了2024年会议的最终决定,其中引起广泛关注的是一个名为Mamba的模型。这个模型最初被认为是对抗著名的Transformer架构进行语言建模任务的主要竞争者,但最终被拒绝&…

植物大战僵尸杂交版 fatal error及问题解决闪退

echo off set KEY_NAMESoftware\PopCap\PlantsVsZombies set VALUE_NAMEScreenmode set DATA0 reg add HKCU%KEY_NAME% /v %VALUE_NAME% /t REG_DWORD /d %DATA% /f if %errorlevel% neq 0 ( echo 注册表数值数据修改失败 ) else ( echo 注册表数值数据已成功修改为0 ) 将上述…

什么是场外期权?场外期权有几种做法?

今天带你了解什么是场外期权?场外期权有几种做法?期权分为场内期权,场外期权。场内期权我们都知道,是在期货盘里购买的期权,但场外期权呢? 什么是场外期权? 场外期权是一种在交易所之外进行交易…

组件二次封装,通过属性事件透传,插槽使用,组件实例方法的绑定,深入理解 Vue.js 组件扩展与插槽

透传,插槽,组件实例方法的绑定,深入理解 Vue.js 组件扩展与插槽 前言 Vue.js 提供了强大的组件化系统,允许开发者构建可复用、可组合的UI组件。在实际项目中,直接使用第三方库提供的基础组件(如Element UI…

DBA必备!如何使用DBdoctor进行索引推荐

近期,一些用户在安装DBdoctor并完成实例纳管后,常在DBdoctor概览页面或实例性能洞察页面看到索引推荐的相关信息,他们对这些信息的来源、索引推荐的触发场景以及实现流程等比较关注,也想了解是否存在其他能够触发索引推荐的场景。…

【Hive中篇: 一篇文章带你了解表的静态分区,动态分区! 分桶!Hive sql的内置函数!复杂数据类型!hive的简单查询语句!】

前言: 💞💞大家好,我是书生♡,本篇文章主要分享的是大数据开发中hive的相关技术,表的静态分区,动态分区,分桶!Hive sql的内置函数!复杂数据类型!以…

优雅谈大模型11:Mistral

大模型技术论文不断,每个月总会新增上千篇。本专栏精选论文重点解读,主题还是围绕着行业实践和工程量产。若在某个环节出现卡点,可以回到大模型必备腔调或者LLM背后的基础模型新阅读。而最新科技(Mamba,xLSTM,KAN)则提…

android studio4.1后不能ButterKnife

麻蛋L最近发现 android studio不能使用ButterKnife啦!ButterKnife Injections不维护,butterknife Zelezny也不维护!!!日…难受,兄弟们换下一家:IDsCreate,一毛一样的好用&#xff01…

2024年计算机科学与电子信息工程国际会议(ICSEIE 2024)

2024 International Conference on Computer Science and Electronic Information Engineering 【1】大会信息 会议简称:ICSEIE 2024 大会时间:2024-07-19 大会地点:中国苏州 截稿时间:2024-07-05(以官网为准) 审稿通…

git提交错了?别慌,直接删除提交记录

git revert 和git reset !这两个命令都有撤销操作的功能!哪一个可以删除提提交记录??? 使用git revert撤销提交 revert的英文释义是回复、恢复(到原来的状态) 作用 git revert 是 Git 中用于撤…

IntelliJ IDEA 用maven创建web项目

前言 已经安装并配置好Tomcat。具体步骤:Tomcat安装及环境变量配置(一看就会)-CSDN博客​编辑https://blog.csdn.net/longyongyyds/article/details/135825647 具体步骤 1.新建一个maven项目 2,配置好tomcat服务器 3.运行测试一下 maven教程&#xf…

搜维尔科技:特斯拉称工厂内有两台人形机器人开始自主工作

搜维尔科技消息,据外电报道,特斯拉声称,其目前拥有两台 Optimus 人形机器人在工厂内自主工作,这尚属首次。 如果目前这场薪酬方案混乱有什么好处的话,那就是特斯拉几乎看起来又有了一个公关部门。 当然,其…

3d模型文件格式有那些,什么区别?---模大狮模型网

3D模型文件格式有很多种,每种格式都有其特点和应用场景。常见的3D模型文件格式包括OBJ、FBX、STL、3DS、DAE等,下面将逐一介绍这些格式的区别。 1. OBJ格式:OBJ是一种开放的3D模型文件格式,可以被几乎所有的3D软件所支持。OBJ格式…

Linux:线程概念 线程控制

Linux:线程概念 & 线程控制 线程概念轻量级进程 LWP页表 线程控制POSIX 线程库 - ptherad线程创建pthread_createpthread_self 线程退出pthread_exitpthread_cancelpthread_joinpthread_detach 线程架构线程与地址空间线程与pthread动态库 线程的优缺点 线程概念…

笔记98:按列压缩矩阵 csc_matrix 的 “含义”

1. 如何按列压缩矩阵: 注:按列压缩(Compressed Sparse Column -- CSC),是一种使用三个特征数组就可以表示整个矩阵的方法; 标准二次规划问题 :状态量:矩阵:向量&#xff…

11_从注意力机制到序列处理的革命:Transformer原理详解

1.1 简介 Transformer是一种深度学习模型,主要用于处理序列数据,尤其是自然语言处理任务,如机器翻译、文本摘要等。该模型由Vaswani等人在2017年的论文《Attention is All You Need》中首次提出,它的出现极大地推动了自然语言处理…

确定性网络_v0

目录 一、背景二、技术参考文献 一、背景 确定性网络(Deterministic Networking)是提供确定性服务质量的网络技术,是在以太网的基础上为多种业务提供端到端确定性服务质量保障的一种新技术。通过对网络数据转发行为的控制,将时延…

Ubuntu系统设置中文输入法

重新设置超级用户权限(root)密码(非必要) sudo passwd root 需要注意的是Ubuntu的root密码不能少于8个字符 设置成功后输入命令和新的密码即可无需输入sudo启用root命令 su - 更新软件包列表 sudo apt update sudo apt upgrade 安装fcitx5输入法框架 个别情况需要卸载旧的…