Compare commits

...
Author SHA1 Message Date
bflatastic 1b0c931ec4 remove character limits on seedance 2 and nano banana models 2026-04-05 06:21:57 +07:00
7 changed files with 19 additions and 19 deletions
@@ -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",