Commit
·
5f62420
1
Parent(s):
bfac008
Ensure additional model components are moved to CPU in app.py to maintain consistency and prevent device-related issues during processing.
Browse files
app.py
CHANGED
@@ -152,6 +152,12 @@ if hasattr(model, 'rgbMlp'):
|
|
152 |
model.rgbMlp = model.rgbMlp.cpu()
|
153 |
if hasattr(model, 'decoder'):
|
154 |
model.decoder = model.decoder.cpu()
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
stage1_config = OmegaConf.load(args.stage1_config).config
|
157 |
stage2_config = OmegaConf.load(args.stage2_config).config
|
|
|
152 |
model.rgbMlp = model.rgbMlp.cpu()
|
153 |
if hasattr(model, 'decoder'):
|
154 |
model.decoder = model.decoder.cpu()
|
155 |
+
if hasattr(model, 'unet2'):
|
156 |
+
model.unet2 = model.unet2.cpu()
|
157 |
+
if hasattr(model.unet2, 'unet'):
|
158 |
+
model.unet2.unet = model.unet2.unet.cpu()
|
159 |
+
if hasattr(model, 'lora'):
|
160 |
+
model.lora = model.lora.cpu()
|
161 |
|
162 |
stage1_config = OmegaConf.load(args.stage1_config).config
|
163 |
stage2_config = OmegaConf.load(args.stage2_config).config
|