takahirox commited on
Commit
cdd743a
1 Parent(s): 62f266f

WIP commit

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -7,10 +7,12 @@ model_id = "dream-textures/texture-diffusion"
7
  device = "cuda"
8
  dtype = torch.float16
9
 
10
- pipe = StableDiffusionPipeline.from_pretrained(
11
- model_id, torch_dtype=dtype
12
- ).to(device)
13
- #pipe = StableDiffusionPipeline.from_pretrained(model_id)
 
 
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,