We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c646d21 commit 45d5c83Copy full SHA for 45d5c83
1 file changed
nodes.py
@@ -1966,9 +1966,11 @@ def INPUT_TYPES(s):
1966
CATEGORY = "image"
1967
1968
def generate(self, width, height, batch_size=1, color=0):
1969
- r = torch.full([batch_size, height, width, 1], ((color >> 16) & 0xFF) / 0xFF)
1970
- g = torch.full([batch_size, height, width, 1], ((color >> 8) & 0xFF) / 0xFF)
1971
- b = torch.full([batch_size, height, width, 1], ((color) & 0xFF) / 0xFF)
+ dtype = comfy.model_management.intermediate_dtype()
+ device = comfy.model_management.intermediate_device()
+ r = torch.full([batch_size, height, width, 1], ((color >> 16) & 0xFF) / 0xFF, device=device, dtype=dtype)
1972
+ g = torch.full([batch_size, height, width, 1], ((color >> 8) & 0xFF) / 0xFF, device=device, dtype=dtype)
1973
+ b = torch.full([batch_size, height, width, 1], ((color) & 0xFF) / 0xFF, device=device, dtype=dtype)
1974
return (torch.cat((r, g, b), dim=-1), )
1975
1976
class ImagePadForOutpaint:
0 commit comments