import React, { useMemo, useState } from "react"; import { ChevronDown, ChevronRight, RefreshCw, Settings2, Sliders, X, Lock } from "lucide-react"; export const CREATOR_STUDIO_PARAM_DEFAULTS = { enabled: false, steps: 30, cfgScale: 3.5, creativity: 0.85, useCustomNegativePrompt: false, customNegativePrompt: "", lockSeed: false, seed: Math.floor(Math.random() * 2147483647), }; export function CreatorStudioSettings({ value, onChange, floating = false, show = true, onRequestClose, }) { const [advancedMode, setAdvancedMode] = useState(true); const presetDefaults = useMemo(() => CREATOR_STUDIO_PARAM_DEFAULTS, []); const reset = () => onChange({ ...presetDefaults, enabled: value.enabled }); const panelBody = (
{/* Enable toggle */}
Enable Parameters
Override generation defaults for images & videos
{/* Advanced Controls accordion */} {advancedMode && (
{/* Steps */}
Steps {value.steps}
onChange({ ...value, steps: Number(e.target.value) })} className="w-full h-1.5 bg-white/10 rounded-full appearance-none cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:bg-purple-400 [&::-webkit-slider-thumb]:rounded-full"/>
{/* CFG Scale */}
CFG Scale {value.cfgScale.toFixed(1)}
onChange({ ...value, cfgScale: Number(e.target.value) })} className="w-full h-1.5 bg-white/10 rounded-full appearance-none cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:bg-purple-400 [&::-webkit-slider-thumb]:rounded-full"/>
{/* Creativity */}
Creativity {value.creativity.toFixed(2)}
More Faithful More Creative
onChange({ ...value, creativity: Number(e.target.value) })} className="w-full h-1.5 bg-white/10 rounded-full appearance-none cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:bg-purple-400 [&::-webkit-slider-thumb]:rounded-full"/>
{/* Custom Negative Prompt */}
Custom Negative Prompt
{value.useCustomNegativePrompt && (