nuwandaa commited on
Commit
822bfff
·
1 Parent(s): 4f8acba

Update device info

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -63,7 +63,7 @@ pipeline = DiffusionPipeline.from_pretrained(
63
  variant="fp16",
64
  use_safetensors=True,
65
  torch_dtype=dtype,
66
- ).to(device)
67
 
68
  if is_attention_slicing_enabled:
69
  pipeline.enable_attention_slicing()
@@ -80,8 +80,8 @@ def remove(gradio_image, rm_guidance_scale=9, num_inference_steps=50, seed=42, s
80
 
81
  source_image_pure = gradio_image["background"]
82
  mask_image_pure = gradio_image["layers"][0]
83
- source_image = preprocess_image(source_image_pure.convert('RGB'), device)
84
- mask = preprocess_mask(mask_image_pure, device)
85
 
86
  START_STEP = 0 # AAS start step
87
  END_STEP = int(strength * num_inference_steps) # AAS end step
 
63
  variant="fp16",
64
  use_safetensors=True,
65
  torch_dtype=dtype,
66
+ ).to('cuda')
67
 
68
  if is_attention_slicing_enabled:
69
  pipeline.enable_attention_slicing()
 
80
 
81
  source_image_pure = gradio_image["background"]
82
  mask_image_pure = gradio_image["layers"][0]
83
+ source_image = preprocess_image(source_image_pure.convert('RGB'), 'cuda')
84
+ mask = preprocess_mask(mask_image_pure, 'cuda')
85
 
86
  START_STEP = 0 # AAS start step
87
  END_STEP = int(strength * num_inference_steps) # AAS end step