cocktailpeanut commited on
Commit
e38f741
1 Parent(s): 70546b5
Files changed (3) hide show
  1. app.py +4 -0
  2. icon.png +0 -0
  3. pinokio.js +1 -0
app.py CHANGED
@@ -16,6 +16,10 @@ pipes = {
16
  "img2img": AutoPipelineForImage2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16").to(device)
17
  }
18
 
 
 
 
 
19
 
20
  def run(prompt, image):
21
  print(f"prompt={prompt}, image={image}")
 
16
  "img2img": AutoPipelineForImage2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16").to(device)
17
  }
18
 
19
+ if device == "cpu":
20
+ pipes["txt2img"].enable_model_cpu_offload()
21
+ pipes["img2img"].enable_model_cpu_offload()
22
+
23
 
24
  def run(prompt, image):
25
  print(f"prompt={prompt}, image={image}")
icon.png ADDED
pinokio.js CHANGED
@@ -1,5 +1,6 @@
1
  module.exports = {
2
  title: "sdxl turbo",
 
3
  menu: async (kernel) => {
4
  let installed = await kernel.exists(__dirname, "env")
5
  if (installed) {
 
1
  module.exports = {
2
  title: "sdxl turbo",
3
+ description: "A Real-Time Text-to-Image Generation Model",
4
  menu: async (kernel) => {
5
  let installed = await kernel.exists(__dirname, "env")
6
  if (installed) {