mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-09 11:31:27 +00:00
remove character limits on seedance 2 and nano banana models (#1303)
This commit is contained in:
1 parent
e89229896f
commit
03ed457cb5
7 files changed
+19
-19
No files matched your search
@@ -267,7 +267,7 @@ export const PromptBox2D = ({
|
||||
const handleGenerate = async () => {
|
||||
const busy = Boolean(isEnqueueing ?? internalEnqueueing);
|
||||
if (busy || isDisabled || !prompt.trim()) return;
|
||||
if (prompt.length > maxLen) {
|
||||
if (isFinite(maxLen) && prompt.length > maxLen) {
|
||||
toast.error(
|
||||
`Prompt exceeds the ${maxLen} character limit for this model`,
|
||||
);
|
||||
@@ -427,9 +427,9 @@ export const PromptBox2D = ({
|
||||
onBlur={() => {}}
|
||||
/>
|
||||
<span
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${isFinite(maxLen) && prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}
|
||||
>
|
||||
{prompt.length} / {maxLen}
|
||||
{prompt.length} / {isFinite(maxLen) ? maxLen : "∞"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -269,7 +269,7 @@ export const PromptBox3D = ({
|
||||
const maxLen = selectedImageModel?.maxPromptLength ?? 1000;
|
||||
|
||||
const handleEnqueue = async () => {
|
||||
if (prompt.length > maxLen) {
|
||||
if (isFinite(maxLen) && prompt.length > maxLen) {
|
||||
toast.error(`Prompt exceeds the ${maxLen} character limit for this model`);
|
||||
return;
|
||||
}
|
||||
@@ -632,8 +632,8 @@ export const PromptBox3D = ({
|
||||
isPromptBoxFocused.value = false;
|
||||
}}
|
||||
/>
|
||||
<span className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}>
|
||||
{prompt.length} / {maxLen}
|
||||
<span className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${isFinite(maxLen) && prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}>
|
||||
{prompt.length} / {isFinite(maxLen) ? maxLen : "∞"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -262,7 +262,7 @@ export const PromptBoxEdit = ({
|
||||
const handleGenerate = async () => {
|
||||
const busy = Boolean(isEnqueueing ?? internalEnqueueing);
|
||||
if (busy || isDisabled || !prompt.trim()) return;
|
||||
if (prompt.length > maxLen) {
|
||||
if (isFinite(maxLen) && prompt.length > maxLen) {
|
||||
toast.error(
|
||||
`Prompt exceeds the ${maxLen} character limit for this model`,
|
||||
);
|
||||
@@ -439,9 +439,9 @@ export const PromptBoxEdit = ({
|
||||
onBlur={() => setIsFocused(false)}
|
||||
/>
|
||||
<span
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${prompt.length > maxLen ? "text-red-500" : "text-white/40"}`}
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${isFinite(maxLen) && prompt.length > maxLen ? "text-red-500" : "text-white/40"}`}
|
||||
>
|
||||
{prompt.length} / {maxLen}
|
||||
{prompt.length} / {isFinite(maxLen) ? maxLen : "∞"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -263,7 +263,7 @@ export const PromptBoxImage = ({
|
||||
console.warn("Cannot generate image: prompt is empty");
|
||||
return;
|
||||
}
|
||||
if (prompt.length > maxLen) {
|
||||
if (isFinite(maxLen) && prompt.length > maxLen) {
|
||||
toast.error(
|
||||
`Prompt exceeds the ${maxLen} character limit for this model`,
|
||||
);
|
||||
@@ -493,9 +493,9 @@ export const PromptBoxImage = ({
|
||||
onBlur={() => setIsFocused(false)}
|
||||
/>
|
||||
<span
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${isFinite(maxLen) && prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}
|
||||
>
|
||||
{prompt.length} / {maxLen}
|
||||
{prompt.length} / {isFinite(maxLen) ? maxLen : "∞"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -591,7 +591,7 @@ export const PromptBoxVideo = ({
|
||||
toast.error("Please enter a prompt to generate video");
|
||||
return;
|
||||
}
|
||||
if (prompt.length > maxLen) {
|
||||
if (isFinite(maxLen) && prompt.length > maxLen) {
|
||||
toast.error(
|
||||
`Prompt exceeds the ${maxLen} character limit for this model`,
|
||||
);
|
||||
@@ -933,9 +933,9 @@ export const PromptBoxVideo = ({
|
||||
/>
|
||||
)}
|
||||
<span
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}
|
||||
className={`absolute -bottom-1 right-0 text-[10px] tabular-nums ${isFinite(maxLen) && prompt.length > maxLen ? "text-red-500" : "text-base-fg/40"}`}
|
||||
>
|
||||
{prompt.length} / {maxLen}
|
||||
{prompt.length} / {isFinite(maxLen) ? maxLen : "∞"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -182,7 +182,7 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
canTextToImage: true,
|
||||
tags: [ModelTag.InstructiveEdit],
|
||||
progressBarTime: 25000,
|
||||
maxPromptLength: 2500,
|
||||
maxPromptLength: Infinity,
|
||||
// canChangeResolution: true,
|
||||
canChangeAspectRatio: true,
|
||||
defaultAspectRatio: CommonAspectRatio.Square,
|
||||
@@ -217,7 +217,7 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
canTextToImage: true,
|
||||
tags: [ModelTag.InstructiveEdit],
|
||||
progressBarTime: 25000,
|
||||
maxPromptLength: 2500,
|
||||
maxPromptLength: Infinity,
|
||||
canChangeResolution: true,
|
||||
canChangeAspectRatio: true,
|
||||
defaultAspectRatio: CommonAspectRatio.Square,
|
||||
@@ -257,7 +257,7 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
canTextToImage: true,
|
||||
tags: [ModelTag.InstructiveEdit],
|
||||
progressBarTime: 25000,
|
||||
maxPromptLength: 2500,
|
||||
maxPromptLength: Infinity,
|
||||
canChangeResolution: true,
|
||||
canChangeAspectRatio: true,
|
||||
defaultAspectRatio: CommonAspectRatio.Square,
|
||||
|
||||
@@ -309,7 +309,7 @@ export const VIDEO_MODELS: VideoModel[] = [
|
||||
defaultResolution: "720p",
|
||||
supportsSystemPrompt: false,
|
||||
progressBarTime: 900000, // ~15 minutes
|
||||
maxPromptLength: 3000,
|
||||
maxPromptLength: Infinity,
|
||||
}),
|
||||
new VideoModel({
|
||||
id: "sora_2",
|
||||
|
||||
Reference in new issue
Block a user