Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ from torchvision import transforms
|
|
12 |
|
13 |
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
|
14 |
dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
15 |
-
pipeline = AutoPipelineForText2Image.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=dtype, device_map="
|
16 |
pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter_sdxl.bin")
|
17 |
|
18 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
|
12 |
|
13 |
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
|
14 |
dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
15 |
+
pipeline = AutoPipelineForText2Image.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=dtype, device_map="balanced")
|
16 |
pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter_sdxl.bin")
|
17 |
|
18 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|