sergeipetrov
commited on
Commit
•
686892f
1
Parent(s):
92c4446
Update handler.py
Browse files- handler.py +1 -0
handler.py
CHANGED
@@ -18,6 +18,7 @@ class EndpointHandler:
|
|
18 |
Swin2SRModel._no_split_modules = ["Swin2SREmbeddings", "Swin2SRStage"]
|
19 |
Swin2SRForImageSuperResolution._no_split_modules = ["Swin2SREmbeddings", "Swin2SRStage"]
|
20 |
model = Swin2SRForImageSuperResolution.from_pretrained("caidas/swin2SR-classical-sr-x2-64", device_map="auto")
|
|
|
21 |
model.hf_device_map["swin2sr.conv_after_body"] = model.hf_device_map["swin2sr.embeddings"]
|
22 |
model.hf_device_map["upsample"] = model.hf_device_map["swin2sr.embeddings"]
|
23 |
self.model = Swin2SRForImageSuperResolution.from_pretrained("caidas/swin2SR-classical-sr-x2-64", device_map=model.hf_device_map)
|
|
|
18 |
Swin2SRModel._no_split_modules = ["Swin2SREmbeddings", "Swin2SRStage"]
|
19 |
Swin2SRForImageSuperResolution._no_split_modules = ["Swin2SREmbeddings", "Swin2SRStage"]
|
20 |
model = Swin2SRForImageSuperResolution.from_pretrained("caidas/swin2SR-classical-sr-x2-64", device_map="auto")
|
21 |
+
logger.info(model.hf_device_map)
|
22 |
model.hf_device_map["swin2sr.conv_after_body"] = model.hf_device_map["swin2sr.embeddings"]
|
23 |
model.hf_device_map["upsample"] = model.hf_device_map["swin2sr.embeddings"]
|
24 |
self.model = Swin2SRForImageSuperResolution.from_pretrained("caidas/swin2SR-classical-sr-x2-64", device_map=model.hf_device_map)
|