赞
踩
只需要将ollama部署到本地,借助comfyui ollama节点即可给你的Ai绘画提示词插上想象的翅膀。具体看详细步骤!
第一步打开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 学习资料已经上传CSDN,朋友们如果需要可以微信扫描下方CSDN官方认证二维码免费领取【保证100%免费
】
AI大模型时代的学习之旅:从基础到前沿,掌握人工智能的核心技能!
这套包含640份报告的合集,涵盖了AI大模型的理论研究、技术实现、行业应用等多个方面。无论您是科研人员、工程师,还是对AI大模型感兴趣的爱好者,这套报告合集都将为您提供宝贵的信息和启示。
随着人工智能技术的飞速发展,AI大模型已经成为了当今科技领域的一大热点。这些大型预训练模型,如GPT-3、BERT、XLNet等,以其强大的语言理解和生成能力,正在改变我们对人工智能的认识。 那以下这些PDF籍就是非常不错的学习资源。
作为普通人,入局大模型时代需要持续学习和实践,不断提高自己的技能和认知水平,同时也需要有责任感和伦理意识,为人工智能的健康发展贡献力量。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。