remove noisy latent code

This commit is contained in:
Saquib Alam 2023-08-08 22:41:52 +05:30 committed by GitHub
parent 4a25a653db
commit 9fedd24fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -871,28 +871,6 @@ class EmptyLatentImage:
latent = torch.zeros([batch_size, 4, height // 8, width // 8]) latent = torch.zeros([batch_size, 4, height // 8, width // 8])
return ({"samples":latent}, ) return ({"samples":latent}, )
class NoisyLatentImage:
def __init__(self, device="cpu"):
self.device = device
@classmethod
def INPUT_TYPES(s):
return {"required": {
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
"width": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
"height": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
"batch_size": ("INT", {"default": 1, "min": 1, "max": 64})}}
RETURN_TYPES = ("LATENT",)
FUNCTION = "generate"
CATEGORY = "latent"
def generate(self, seed, width, height, batch_size=1):
generator = torch.manual_seed(seed)
latent = torch.randn([batch_size, 4, height // 8, width // 8], generator=generator, device=self.device)
return ({"samples":latent}, )
class LatentFromBatch: class LatentFromBatch:
@classmethod @classmethod
def INPUT_TYPES(s): def INPUT_TYPES(s):