mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-10 14:20:49 +08:00
Move nodes_chroma_radiance
This commit is contained in:
parent
fd6e5c2c8d
commit
66cf9b41f2
@ -121,4 +121,5 @@ __all__ = [
|
|||||||
"InputImpl",
|
"InputImpl",
|
||||||
"Types",
|
"Types",
|
||||||
"ComfyExtension",
|
"ComfyExtension",
|
||||||
|
"io",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -4,9 +4,9 @@ from typing import Callable
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
import comfy.model_management
|
import comfy.model_management
|
||||||
|
from comfy.nodes.common import MAX_RESOLUTION
|
||||||
from comfy_api.latest import ComfyExtension, io
|
from comfy_api.latest import ComfyExtension, io
|
||||||
|
|
||||||
import nodes
|
|
||||||
|
|
||||||
class EmptyChromaRadianceLatentImage(io.ComfyNode):
|
class EmptyChromaRadianceLatentImage(io.ComfyNode):
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -15,17 +15,17 @@ class EmptyChromaRadianceLatentImage(io.ComfyNode):
|
|||||||
node_id="EmptyChromaRadianceLatentImage",
|
node_id="EmptyChromaRadianceLatentImage",
|
||||||
category="latent/chroma_radiance",
|
category="latent/chroma_radiance",
|
||||||
inputs=[
|
inputs=[
|
||||||
io.Int.Input(id="width", default=1024, min=16, max=nodes.MAX_RESOLUTION, step=16),
|
io.Int.Input(id="width", default=1024, min=16, max=MAX_RESOLUTION, step=16),
|
||||||
io.Int.Input(id="height", default=1024, min=16, max=nodes.MAX_RESOLUTION, step=16),
|
io.Int.Input(id="height", default=1024, min=16, max=MAX_RESOLUTION, step=16),
|
||||||
io.Int.Input(id="batch_size", default=1, min=1, max=4096),
|
io.Int.Input(id="batch_size", default=1, min=1, max=4096),
|
||||||
],
|
],
|
||||||
outputs=[io.Latent().Output()],
|
outputs=[io.Latent().Output()],
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def execute(cls, *, width: int, height: int, batch_size: int=1) -> io.NodeOutput:
|
def execute(cls, *, width: int, height: int, batch_size: int = 1) -> io.NodeOutput:
|
||||||
latent = torch.zeros((batch_size, 3, height, width), device=comfy.model_management.intermediate_device())
|
latent = torch.zeros((batch_size, 3, height, width), device=comfy.model_management.intermediate_device())
|
||||||
return io.NodeOutput({"samples":latent})
|
return io.NodeOutput({"samples": latent})
|
||||||
|
|
||||||
|
|
||||||
class ChromaRadianceOptions(io.ComfyNode):
|
class ChromaRadianceOptions(io.ComfyNode):
|
||||||
@ -68,13 +68,13 @@ class ChromaRadianceOptions(io.ComfyNode):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def execute(
|
def execute(
|
||||||
cls,
|
cls,
|
||||||
*,
|
*,
|
||||||
model: io.Model.Type,
|
model: io.Model.Type,
|
||||||
preserve_wrapper: bool,
|
preserve_wrapper: bool,
|
||||||
start_sigma: float,
|
start_sigma: float,
|
||||||
end_sigma: float,
|
end_sigma: float,
|
||||||
nerf_tile_size: int,
|
nerf_tile_size: int,
|
||||||
) -> io.NodeOutput:
|
) -> io.NodeOutput:
|
||||||
radiance_options = {}
|
radiance_options = {}
|
||||||
if nerf_tile_size >= 0:
|
if nerf_tile_size >= 0:
|
||||||
Loading…
Reference in New Issue
Block a user