VIVEK JAYARAM
commited on
Commit
·
d6f08b1
1
Parent(s):
f5c3b8a
Fix bug with cuda device
Browse files- app.py +1 -1
- inference.py +1 -1
app.py
CHANGED
@@ -93,7 +93,7 @@ def run_restoration(data, T, K):
|
|
93 |
# Initialize model if not already done
|
94 |
if model is None:
|
95 |
model_type = "diffusers"
|
96 |
-
model = DiffusionPipeline.from_pretrained("google/ddpm-celebahq-256").to(
|
97 |
|
98 |
ddim_scheduler = DDIMScheduler(
|
99 |
num_train_timesteps=1000,
|
|
|
93 |
# Initialize model if not already done
|
94 |
if model is None:
|
95 |
model_type = "diffusers"
|
96 |
+
model = DiffusionPipeline.from_pretrained("google/ddpm-celebahq-256").to(device).unet
|
97 |
|
98 |
ddim_scheduler = DDIMScheduler(
|
99 |
num_train_timesteps=1000,
|
inference.py
CHANGED
@@ -64,7 +64,7 @@ def main(args):
|
|
64 |
else:
|
65 |
# Huggingface diffusers model
|
66 |
model_type = "diffusers"
|
67 |
-
model = DiffusionPipeline.from_pretrained(args.model_config).to(
|
68 |
|
69 |
# All the models have the same scheduler.
|
70 |
# you can change this for different models
|
|
|
64 |
else:
|
65 |
# Huggingface diffusers model
|
66 |
model_type = "diffusers"
|
67 |
+
model = DiffusionPipeline.from_pretrained(args.model_config).to(device).unet
|
68 |
|
69 |
# All the models have the same scheduler.
|
70 |
# you can change this for different models
|