wencheng256 commited on
Commit
9c41a87
·
verified ·
1 Parent(s): 3b6559c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,10 +9,10 @@ import traceback
9
  # ========== 1. Load Models ==========
10
  pipe = StableDiffusionXLControlNetRAWPipeline.from_pretrained(
11
  "wencheng256/DiffusionRAW",
12
- torch_dtype=torch.float32
13
  )
14
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
15
- # pipe.enable_model_cpu_offload()
16
 
17
  # ========== 2. Utility function: tensor -> PIL ==========
18
  def tensor_to_pil(img_tensor: torch.Tensor) -> Image.Image:
 
9
  # ========== 1. Load Models ==========
10
  pipe = StableDiffusionXLControlNetRAWPipeline.from_pretrained(
11
  "wencheng256/DiffusionRAW",
12
+ torch_dtype=torch.float16
13
  )
14
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
15
+ pipe.enable_model_cpu_offload()
16
 
17
  # ========== 2. Utility function: tensor -> PIL ==========
18
  def tensor_to_pil(img_tensor: torch.Tensor) -> Image.Image: