elismasilva commited on
Commit
5cbf75a
·
1 Parent(s): e8d09af

disable CPU offloading

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ pipe = StableDiffusionXLControlNetTileSRPipeline.from_pretrained(
26
  model_id, controlnet=controlnet, vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
27
  ).to(device)
28
 
29
- pipe.enable_model_cpu_offload() # << Enable this if you have limited VRAM
30
  pipe.enable_vae_tiling() # << Enable this if you have limited VRAM
31
  pipe.enable_vae_slicing() # << Enable this if you have limited VRAM
32
 
@@ -94,7 +94,7 @@ def predict(
94
  tile_gaussian_sigma=float(tile_gaussian_sigma),
95
  num_inference_steps=num_inference_steps,
96
  )["images"][0]
97
- image.save("result.png")
98
  return image
99
 
100
 
 
26
  model_id, controlnet=controlnet, vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
27
  ).to(device)
28
 
29
+ #pipe.enable_model_cpu_offload() # << Enable this if you have limited VRAM
30
  pipe.enable_vae_tiling() # << Enable this if you have limited VRAM
31
  pipe.enable_vae_slicing() # << Enable this if you have limited VRAM
32
 
 
94
  tile_gaussian_sigma=float(tile_gaussian_sigma),
95
  num_inference_steps=num_inference_steps,
96
  )["images"][0]
97
+
98
  return image
99
 
100