T1ckbase commited on
Commit
d8d3b7d
·
1 Parent(s): 89b8828
Files changed (1) hide show
  1. main.ts +13 -12
main.ts CHANGED
@@ -39,13 +39,14 @@ async function main() {
39
 
40
  // const prompt = `Photorealistic rendering, hyper-detailed textures, cinematic lighting with volumetric effects, sharp focus with shallow depth of field, subtle chromatic aberration, high dynamic range, meticulous surface imperfections, natural color grading, ultra-high resolution, capturing nuanced light and shadow play, emphasizing tactile qualities, ambient occlusion, advanced ray tracing, realistic lens flares, precise material properties, capturing the essence of observed reality. ` +
41
  // Array.from({ length: randomIntegerBetween(100, 200) }, () => randomString(randomIntegerBetween(1, 100))).join(' ');
42
- const prompt = Array.from({ length: randomIntegerBetween(10, 100) }, () => randomString(randomIntegerBetween(1, 100))).join(' ');
 
43
  const imgArrayBuffer = await generateImage('black-forest-labs/FLUX.1-schnell', {
44
  inputs: prompt,
45
  parameters: {
46
  width: 1280,
47
  height: 1280,
48
- guidance_scale: 1.7,
49
  num_inference_steps: 4,
50
  },
51
  });
@@ -58,13 +59,13 @@ async function main() {
58
  }
59
  }
60
 
61
- // while (true) {
62
- // const SPACE_HOST = Deno.env.get('SPACE_HOST');
63
- // SPACE_HOST && await fetch(`https://${SPACE_HOST}`);
64
- // try {
65
- // await main();
66
- // } catch (e) {
67
- // console.error(e);
68
- // await delay(10000);
69
- // }
70
- // }
 
39
 
40
  // const prompt = `Photorealistic rendering, hyper-detailed textures, cinematic lighting with volumetric effects, sharp focus with shallow depth of field, subtle chromatic aberration, high dynamic range, meticulous surface imperfections, natural color grading, ultra-high resolution, capturing nuanced light and shadow play, emphasizing tactile qualities, ambient occlusion, advanced ray tracing, realistic lens flares, precise material properties, capturing the essence of observed reality. ` +
41
  // Array.from({ length: randomIntegerBetween(100, 200) }, () => randomString(randomIntegerBetween(1, 100))).join(' ');
42
+ // const prompt = Array.from({ length: randomIntegerBetween(10, 100) }, () => randomString(randomIntegerBetween(1, 100))).join(' ');
43
+ const prompt = Array.from({ length: 1000 }, () => String.fromCharCode(randomIntegerBetween(32, 126))).join('');
44
  const imgArrayBuffer = await generateImage('black-forest-labs/FLUX.1-schnell', {
45
  inputs: prompt,
46
  parameters: {
47
  width: 1280,
48
  height: 1280,
49
+ guidance_scale: 1,
50
  num_inference_steps: 4,
51
  },
52
  });
 
59
  }
60
  }
61
 
62
+ while (true) {
63
+ const SPACE_HOST = Deno.env.get('SPACE_HOST');
64
+ SPACE_HOST && await fetch(`https://${SPACE_HOST}`);
65
+ try {
66
+ await main();
67
+ } catch (e) {
68
+ console.error(e);
69
+ await delay(10000);
70
+ }
71
+ }