clrer
Browse files
src/lib/components/MonsterGenerator/MonsterGenerator.svelte
CHANGED
|
@@ -48,7 +48,7 @@ Assistant: **Monster Name:**`;
|
|
| 48 |
|
| 49 |
Describe the appearance of the monsters being sure to include all of its visual details, format the prompt as a single long sentence optimized for image generation.
|
| 50 |
|
| 51 |
-
Assistant
|
| 52 |
|
| 53 |
async function handleImageSelected(file: File) {
|
| 54 |
if (!joyCaptionClient || !rwkvClient || !fluxClient) {
|
|
@@ -124,8 +124,8 @@ Assistant: The`;
|
|
| 124 |
const output = await rwkvClient.predict(0, [
|
| 125 |
conceptPrompt,
|
| 126 |
300, // maxTokens
|
| 127 |
-
|
| 128 |
-
0.
|
| 129 |
0.1, // presencePenalty
|
| 130 |
0.1 // countPenalty
|
| 131 |
]);
|
|
@@ -151,10 +151,10 @@ Assistant: The`;
|
|
| 151 |
console.log('Generating image prompt from concept');
|
| 152 |
|
| 153 |
const output = await rwkvClient.predict(0, [
|
| 154 |
-
|
| 155 |
300, // maxTokens
|
| 156 |
-
|
| 157 |
-
0.
|
| 158 |
0.1, // presencePenalty
|
| 159 |
0.1 // countPenalty
|
| 160 |
]);
|
|
@@ -176,7 +176,7 @@ Assistant: The`;
|
|
| 176 |
}
|
| 177 |
|
| 178 |
const output = await fluxClient.predict("/infer", [
|
| 179 |
-
state.imagePrompt
|
| 180 |
0, // seed
|
| 181 |
true, // randomizeSeed
|
| 182 |
1024, // width
|
|
|
|
| 48 |
|
| 49 |
Describe the appearance of the monsters being sure to include all of its visual details, format the prompt as a single long sentence optimized for image generation.
|
| 50 |
|
| 51 |
+
Assistant:`;
|
| 52 |
|
| 53 |
async function handleImageSelected(file: File) {
|
| 54 |
if (!joyCaptionClient || !rwkvClient || !fluxClient) {
|
|
|
|
| 124 |
const output = await rwkvClient.predict(0, [
|
| 125 |
conceptPrompt,
|
| 126 |
300, // maxTokens
|
| 127 |
+
0.7, // temperature
|
| 128 |
+
0.8, // topP
|
| 129 |
0.1, // presencePenalty
|
| 130 |
0.1 // countPenalty
|
| 131 |
]);
|
|
|
|
| 151 |
console.log('Generating image prompt from concept');
|
| 152 |
|
| 153 |
const output = await rwkvClient.predict(0, [
|
| 154 |
+
promptGenerationPrompt,
|
| 155 |
300, // maxTokens
|
| 156 |
+
0.7, // temperature
|
| 157 |
+
0.8, // topP
|
| 158 |
0.1, // presencePenalty
|
| 159 |
0.1 // countPenalty
|
| 160 |
]);
|
|
|
|
| 176 |
}
|
| 177 |
|
| 178 |
const output = await fluxClient.predict("/infer", [
|
| 179 |
+
`${state.imagePrompt}\nNow generate an Anime-style image of the monster in an idle pose. The monster should not be attacking or in motion. The full monster must be visible within the frame.`,
|
| 180 |
0, // seed
|
| 181 |
true, // randomizeSeed
|
| 182 |
1024, // width
|