jbilcke-hf HF staff commited on
Commit
26ef0a6
1 Parent(s): 9bfb451

improve performance of the LLM

Browse files
src/app/interface/settings-dialog/index.tsx CHANGED
@@ -77,7 +77,7 @@ export function SettingsDialog() {
77
  <DialogTrigger asChild>
78
  <Button className="space-x-1 md:space-x-2">
79
  <div>
80
- <span className="hidden md:inline">Settings</span>
81
  </div>
82
  </Button>
83
  </DialogTrigger>
@@ -123,7 +123,7 @@ export function SettingsDialog() {
123
  />
124
  <span
125
  onClick={() => setRenderingUseTurbo(!renderingUseTurbo)}
126
- className={cn("cursor-pointer", { "text-zinc-800": renderingUseTurbo })}>Use a faster model, but with inferior quality of images (you are warned!).</span>
127
  </div>
128
  </Field>
129
  </>}
 
77
  <DialogTrigger asChild>
78
  <Button className="space-x-1 md:space-x-2">
79
  <div>
80
+ <span className="hidden md:inline">Improve quality</span>
81
  </div>
82
  </Button>
83
  </DialogTrigger>
 
123
  />
124
  <span
125
  onClick={() => setRenderingUseTurbo(!renderingUseTurbo)}
126
+ className={cn("cursor-pointer", { "text-zinc-800": renderingUseTurbo })}>Use a faster by low-quality model (uncheck this for improved quality).</span>
127
  </div>
128
  </Field>
129
  </>}
src/app/interface/share/index.tsx CHANGED
@@ -98,7 +98,7 @@ ${comicFileMd}`;
98
  >
99
  <div className="scale-105"><HuggingClap /></div>
100
  <div>
101
- <span className="hidden md:inline">{remainingImages ? `⌛` : `Share to community`}</span>
102
  <span className="inline md:hidden">{remainingImages ? `⌛` : `Share`}</span>
103
  </div>
104
  </Button>
 
98
  >
99
  <div className="scale-105"><HuggingClap /></div>
100
  <div>
101
+ <span className="hidden md:inline">{remainingImages ? `⌛` : `Share`}</span>
102
  <span className="inline md:hidden">{remainingImages ? `⌛` : `Share`}</span>
103
  </div>
104
  </Button>
src/app/main.tsx CHANGED
@@ -87,8 +87,7 @@ export default function Main() {
87
  nbPanelsToGenerate,
88
  existingPanels,
89
  })
90
- console.log("LLM generated some new panels:")
91
- console.table(candidatePanels)
92
 
93
  existingPanels.push(...candidatePanels)
94
 
 
87
  nbPanelsToGenerate,
88
  existingPanels,
89
  })
90
+ console.log("LLM generated some new panels:", candidatePanels)
 
91
 
92
  existingPanels.push(...candidatePanels)
93
 
src/app/queries/predictNextPanels.ts CHANGED
@@ -36,14 +36,14 @@ export const predictNextPanels = async ({
36
  `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.`,
37
  `Give your response as a VALID JSON array like this: \`Array<{ panel: number; instructions: string; caption: string; }>\`.`,
38
  // `Give your response as Markdown bullet points.`,
39
- `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.`
40
  ].filter(item => item).join("\n")
41
  },
42
  {
43
  role: "user",
44
  content: `The story is about: ${prompt}.${existingPanelsTemplate}`,
45
  }
46
- ]) + "\n```[{"
47
 
48
 
49
  let result = ""
 
36
  `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.`,
37
  `Give your response as a VALID JSON array like this: \`Array<{ panel: number; instructions: string; caption: string; }>\`.`,
38
  // `Give your response as Markdown bullet points.`,
39
+ `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!`
40
  ].filter(item => item).join("\n")
41
  },
42
  {
43
  role: "user",
44
  content: `The story is about: ${prompt}.${existingPanelsTemplate}`,
45
  }
46
+ ]) + "\n[{"
47
 
48
 
49
  let result = ""