mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 04:52:31 +08:00
cleanup
This commit is contained in:
parent
e433039102
commit
c35def1107
@ -33,7 +33,7 @@ class ZeroSFT(nn.Module):
|
|||||||
else:
|
else:
|
||||||
h_raw = h
|
h_raw = h
|
||||||
|
|
||||||
h = h.add_(self.zero_conv(c))
|
h = h + self.zero_conv(c)
|
||||||
if h_ori is not None and self.pre_concat:
|
if h_ori is not None and self.pre_concat:
|
||||||
h = torch.cat([h_ori, h], dim=1)
|
h = torch.cat([h_ori, h], dim=1)
|
||||||
actv = self.mlp_shared(c)
|
actv = self.mlp_shared(c)
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import torch
|
import torch
|
||||||
import comfy.model_management
|
|
||||||
from comfy.ldm.modules.diffusionmodules.openaimodel import Upsample
|
from comfy.ldm.modules.diffusionmodules.openaimodel import Upsample
|
||||||
|
|
||||||
|
|
||||||
@ -29,7 +28,6 @@ class SUPIRPatch:
|
|||||||
return
|
return
|
||||||
x = kwargs["x"]
|
x = kwargs["x"]
|
||||||
batch_size = x.shape[0]
|
batch_size = x.shape[0]
|
||||||
comfy.model_management.load_models_gpu([self.model_patch])
|
|
||||||
hint = self.hint_latent.to(device=x.device, dtype=x.dtype)
|
hint = self.hint_latent.to(device=x.device, dtype=x.dtype)
|
||||||
if hint.shape[0] < batch_size:
|
if hint.shape[0] < batch_size:
|
||||||
hint = hint.repeat(batch_size // hint.shape[0], 1, 1, 1)[:batch_size]
|
hint = hint.repeat(batch_size // hint.shape[0], 1, 1, 1)[:batch_size]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user