Spaces:
Sleeping
Sleeping
Julian Bilcke commited on
Commit ·
26ef0a6
1
Parent(s): 9bfb451
improve performance of the LLM
Browse filesFiles changed (4)
76 unmodified lines7778798081828339 unmodified lines12312412512612712812976 unmodified lines<DialogTrigger asChild><Button className="space-x-1 md:space-x-2"><div><span className="hidden md:inline">Settings</span></div></Button></DialogTrigger>39 unmodified lines/><spanonClick={() => setRenderingUseTurbo(!renderingUseTurbo)}className={cn("cursor-pointer", { "text-zinc-800": renderingUseTurbo })}>Use a faster model, but with inferior quality of images (you are warned!).</span></div></Field></>}76 unmodified lines7778798081828339 unmodified lines12312412512612712812976 unmodified lines<DialogTrigger asChild><Button className="space-x-1 md:space-x-2"><div><span className="hidden md:inline">Improve quality</span></div></Button></DialogTrigger>39 unmodified lines/><spanonClick={() => setRenderingUseTurbo(!renderingUseTurbo)}className={cn("cursor-pointer", { "text-zinc-800": renderingUseTurbo })}>Use a faster by low-quality model (uncheck this for improved quality).</span></div></Field></>}
97 unmodified lines989910010110210310497 unmodified lines><div className="scale-105"><HuggingClap /></div><div><span className="hidden md:inline">{remainingImages ? `⌛` : `Share to community`}</span><span className="inline md:hidden">{remainingImages ? `⌛` : `Share`}</span></div></Button>97 unmodified lines989910010110210310497 unmodified lines><div className="scale-105"><HuggingClap /></div><div><span className="hidden md:inline">{remainingImages ? `⌛` : `Share`}</span><span className="inline md:hidden">{remainingImages ? `⌛` : `Share`}</span></div></Button>
86 unmodified lines878889909192939486 unmodified linesnbPanelsToGenerate,existingPanels,})console.log("LLM generated some new panels:")console.table(candidatePanels)existingPanels.push(...candidatePanels)86 unmodified lines8788899091929386 unmodified linesnbPanelsToGenerate,existingPanels,})console.log("LLM generated some new panels:", candidatePanels)existingPanels.push(...candidatePanels)
35 unmodified lines363738394041424344454647484935 unmodified lines`Please write detailed drawing instructions and short (2-3 sentences long) speech captions for the next ${nbPanelsToGenerate} panels of a new story, but keep it open-ended (it will be continued and expanded later). Please make sure each of those ${nbPanelsToGenerate} panels include info about character gender, age, origin, clothes, colors, location, lights, etc.`,`Give your response as a VALID JSON array like this: \`Array<{ panel: number; instructions: string; caption: string; }>\`.`,// `Give your response as Markdown bullet points.`,`Be brief in your ${nbPanelsToGenerate} instructions and narrative captions, don't add your own comments. The captions must be captivating, smart, entertaining. Be straight to the point, and never reply things like "Sure, I can.." etc. Reply using valid JSON.`].filter(item => item).join("\n")},{role: "user",content: `The story is about: ${prompt}.${existingPanelsTemplate}`,}]) + "\n```[{"let result = ""35 unmodified lines363738394041424344454647484935 unmodified lines`Please write detailed drawing instructions and short (2-3 sentences long) speech captions for the next ${nbPanelsToGenerate} panels of a new story, but keep it open-ended (it will be continued and expanded later). Please make sure each of those ${nbPanelsToGenerate} panels include info about character gender, age, origin, clothes, colors, location, lights, etc.`,`Give your response as a VALID JSON array like this: \`Array<{ panel: number; instructions: string; caption: string; }>\`.`,// `Give your response as Markdown bullet points.`,`Be brief in your ${nbPanelsToGenerate} instructions and narrative captions, don't add your own comments. The captions must be captivating, smart, entertaining. Be straight to the point, and never reply things like "Sure, I can.." etc. Reply using valid JSON!! Important: Write valid JSON!`].filter(item => item).join("\n")},{role: "user",content: `The story is about: ${prompt}.${existingPanelsTemplate}`,}]) + "\n[{"let result = ""
src/app/interface/settings-dialog/index.tsx+2-2
src/app/interface/share/index.tsx+1-1
src/app/main.tsx+1-2
src/app/queries/predictNextPanels.ts+2-2