Spaces:
Runtime error
Runtime error
WIP commit
Browse files
app.py
CHANGED
@@ -7,10 +7,12 @@ model_id = "dream-textures/texture-diffusion"
|
|
7 |
device = "cuda"
|
8 |
dtype = torch.float16
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
compel_proc = Compel(
|
16 |
tokenizer=pipe.tokenizer,
|
|
|
7 |
device = "cuda"
|
8 |
dtype = torch.float16
|
9 |
|
10 |
+
if torch.cuda.is_available():
|
11 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
12 |
+
model_id, torch_dtype=dtype
|
13 |
+
).to(device)
|
14 |
+
else:
|
15 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
16 |
|
17 |
compel_proc = Compel(
|
18 |
tokenizer=pipe.tokenizer,
|