Hatman commited on
Commit
ae08710
·
verified ·
1 Parent(s): ac8d8ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
14
  seed = random.randint(0, 2000)
15
  return seed
16
 
17
- device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
18
  dtype = torch.float16 if torch.cuda.is_available() else torch.float32
19
  pipeline = AutoPipelineForText2Image.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=dtype).to(device)
20
  pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter_sdxl.bin", device=device, dtype=dtype)
 
14
  seed = random.randint(0, 2000)
15
  return seed
16
 
17
+ device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
18
  dtype = torch.float16 if torch.cuda.is_available() else torch.float32
19
  pipeline = AutoPipelineForText2Image.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=dtype).to(device)
20
  pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter_sdxl.bin", device=device, dtype=dtype)