Spaces:
Running
on
A100
Running
on
A100
update
Browse files
app.py
CHANGED
@@ -174,7 +174,7 @@ def load_pipeline(use_distilled: bool = False, device: str = "cuda"):
|
|
174 |
)
|
175 |
pipeline.to('cpu')
|
176 |
refiner_pipeline = pipeline.refiner_pipeline
|
177 |
-
|
178 |
refiner_pipeline.to('cpu')
|
179 |
reprompt_model = pipeline.reprompt_model
|
180 |
|
|
|
174 |
)
|
175 |
pipeline.to('cpu')
|
176 |
refiner_pipeline = pipeline.refiner_pipeline
|
177 |
+
refiner_pipeline.text_encoder.model = pipeline.text_encoder.model
|
178 |
refiner_pipeline.to('cpu')
|
179 |
reprompt_model = pipeline.reprompt_model
|
180 |
|
hyimage/diffusion/pipelines/hunyuanimage_pipeline.py
CHANGED
@@ -816,8 +816,8 @@ class HunyuanImagePipeline:
|
|
816 |
self.device = device
|
817 |
if self.dit is not None:
|
818 |
self.dit = self.dit.to(device, non_blocking=True)
|
819 |
-
if self.text_encoder is not None:
|
820 |
-
self.text_encoder = self.text_encoder.to(device, non_blocking=True)
|
821 |
if self.vae is not None:
|
822 |
self.vae = self.vae.to(device, non_blocking=True)
|
823 |
return self
|
|
|
816 |
self.device = device
|
817 |
if self.dit is not None:
|
818 |
self.dit = self.dit.to(device, non_blocking=True)
|
819 |
+
# if self.text_encoder is not None:
|
820 |
+
# self.text_encoder = self.text_encoder.to(device, non_blocking=True)
|
821 |
if self.vae is not None:
|
822 |
self.vae = self.vae.to(device, non_blocking=True)
|
823 |
return self
|
hyimage/diffusion/pipelines/hunyuanimage_refiner_pipeline.py
CHANGED
@@ -259,24 +259,6 @@ class HunYuanImageRefinerPipeline(HunyuanImagePipeline):
|
|
259 |
"""
|
260 |
return cls(config=config)
|
261 |
|
262 |
-
def to(self, device: str | torch.device):
|
263 |
-
"""
|
264 |
-
Move pipeline to specified device.
|
265 |
-
|
266 |
-
Args:
|
267 |
-
device: Target device string
|
268 |
-
|
269 |
-
Returns:
|
270 |
-
Self
|
271 |
-
"""
|
272 |
-
self.device = device
|
273 |
-
if self.dit is not None:
|
274 |
-
self.dit = self.dit.to(device, non_blocking=True)
|
275 |
-
# if self.text_encoder is not None:
|
276 |
-
# self.text_encoder = self.text_encoder.to(device, non_blocking=True)
|
277 |
-
if self.vae is not None:
|
278 |
-
self.vae = self.vae.to(device, non_blocking=True)
|
279 |
-
return self
|
280 |
|
281 |
|
282 |
# Convenience function for easy access
|
|
|
259 |
"""
|
260 |
return cls(config=config)
|
261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
|
264 |
# Convenience function for easy access
|