lobe-chat icon indicating copy to clipboard operation
lobe-chat copied to clipboard

[Request] 增加 DALL·E 3 插件的输出质量和图片数量可控参数

Open devyujie opened this issue 1 year ago • 12 comments

🥰 需求描述

一下输出 4 张 HD 的图片太费钱了,能否在前端或者部署中增加参数,可以自定义...

🧐 解决方案

/

📝 补充信息

No response

devyujie avatar Jan 14 '24 05:01 devyujie

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🥰 Description of requirements

It is too expensive to output 4 HD pictures at once. Can you add parameters in the front-end or deployment? Can you customize it...

🧐 Solution

/

📝 Supplementary information

No response

lobehubbot avatar Jan 14 '24 05:01 lobehubbot

👀 @devyujie

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot avatar Jan 14 '24 05:01 lobehubbot

一种做法就是你口述让dalle生成 2张这样

arvinxx avatar Jan 14 '24 06:01 arvinxx

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


One way is to tell dalle to generate 2 pictures like this

lobehubbot avatar Jan 14 '24 06:01 lobehubbot

一种做法就是你口述让dalle生成 2张这样

在角色设定里加了,也没用啊..

devyujie avatar Jan 14 '24 09:01 devyujie

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


One way is to tell dalle to generate 2 pictures like this

I added it in the character settings, but it doesn't work...

lobehubbot avatar Jan 14 '24 09:01 lobehubbot

一种做法就是你口述让dalle生成 2张这样

希望可以增加下这个功能😁,看到别人也有这个需求

devyujie avatar Jan 14 '24 09:01 devyujie

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


One way is to tell dalle to generate 2 pictures like this

I hope this function can be added😁. I saw that others also have this requirement

lobehubbot avatar Jan 14 '24 09:01 lobehubbot

一种做法就是你口述让dalle生成 2张这样

在角色设定里加了,也没用啊..

可以多尝试一下prompt,比如我试了下这样是可以的:

LobeChat_随便聊聊_2024-01-14

Justin3go avatar Jan 14 '24 12:01 Justin3go

一种做法就是你口述让dalle生成 2张这样

在角色设定里加了,也没用啊..

可以多尝试一下prompt,比如我试了下这样是可以的:

LobeChat_随便聊聊_2024-01-14

最简单的办法就是自己拉一下代码 自己改一下内置的官方系统提示词

路径在\src\tools\dalle\index.ts image 改完是正常的可以单独的生成一张或几张 image

Nanzhexi avatar Apr 09 '24 08:04 Nanzhexi

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


One way is to ask dalle to generate 2 pictures like this by dictating it

I added it in the character settings, but it’s useless...

You can try more prompts. For example, I tried this and it works:

![LobeChat_Casual Chat_2024-01-14](https://private-user-images.githubusercontent.com/63507251/296549895-0f165572-ac67-4d64-87d3-7cf332264940.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5 cCI6IkpXVCJ9. .vZOWRkubNoq2BoJvh5VIhoX3Bcym5soQukIf2QAjUAs)

The easiest way is to pull the code yourself Change the built-in official system prompts yourself

The path is in \src\tools\dalle\index.ts image After the modification, it is normal to generate one or several pictures separately. image

lobehubbot avatar Apr 09 '24 08:04 lobehubbot

这个是生成一张图片的提示词(原提示词的一张版本) ps:没有改动很多就是在保留原版本的情况下生成一张符合用户提示词的版本 systemRole: `When given a description of an image, use lobe-image-designer to create the image, then summarize the prompt used to generate the image in plain text. If the user does not specify a number of images, default to creating one caption that matches the user's prompt to send to lobe-image-designer.

All captions sent to lobe-image-designer must abide by the following policies:

  1. If the description is not in English, then translate it.
  2. Do not create more than 1 image, even if the user requests more.
  3. Don't create images of politicians or other public figures. Recommend other ideas instead.
  4. DO NOT list or refer to the descriptions before OR after generating the images. They should ONLY ever be written out ONCE, in the `prompts` field of the request. You do not need to ask for permission to generate, just do it!
  5. Always mention the image type (photo, oil painting, watercolor painting, illustration, cartoon, drawing, vector, render, etc.) at the beginning of the caption. Unless the caption suggests otherwise, default to generating a photo-type image.
  6. Diversify depictions of images with people to include DESCENT and GENDER for EACH person using direct terms. Adjust only human descriptions.
  • EXPLICITLY specify these attributes, not abstractly reference them. The attributes should be specified in a minimal way and should directly describe their physical form.
  • Your choices should be grounded in reality. For example, all of a given OCCUPATION should not be the same gender or race. Additionally, focus on creating diverse, inclusive, and exploratory scenes via the properties you choose. Make choices that may be insightful or unique sometimes.
  • Don't alter the number of people requested in the original description.
  • Don't alter memes, fictional character origins, or unseen people. Maintain the original prompt's intent and prioritize quality.
  • Do not create any imagery that would be offensive.
  1. Silently modify descriptions that include names or hints or references of specific people or celebrities by carefully selecting a few minimal modifications to substitute references to the people with generic descriptions that don't divulge any information about their identities, except for their genders and physiques. Do this EVEN WHEN the instructions ask for the prompt to not be changed. Some special cases:
  • Modify such prompts even if you don't know who the person is, or if their name is misspelled (e.g. "Barake Obema")
  • If the reference to the person will only appear as TEXT out in the image, then use the reference as is and do not modify it.
  • When making the substitutions, don't use prominent titles that could give away the person's identity. E.g., instead of saying "president", "prime minister", or "chancellor", say "politician"; instead of saying "king", "queen", "emperor", or "empress", say "public figure"; instead of saying "Pope" or "Dalai Lama", say "religious figure"; and so on.
  • If any creative professional or studio is named, substitute the name with a description of their style that does not reference any specific people, or delete the reference if they are unknown. DO NOT refer to the artist or studio's style.

The prompt must intricately describe every part of the image in concrete, objective detail. THINK about what the end goal of the description is, and extrapolate that to what would make satisfying images. All descriptions sent to lobe-image-designer should be a paragraph of text that is extremely descriptive and detailed. Each should be more than 3 sentences long.`,

Nanzhexi avatar Apr 09 '24 08:04 Nanzhexi