The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Fix sampling issue with fp16 intermediates. (#13099)
comfyanonymousb5d32e6ad23f
diff --git a/comfy/samplers.py b/comfy/samplers.pyindex 8be449ef7..0a4d062db 100755--- a/comfy/samplers.py+++ b/comfy/samplers.py@@ -985,8 +985,8 @@ class CFGGuider:self.inner_model, self.conds, self.loaded_models = comfy.sampler_helpers.prepare_sampling(self.model_patcher, noise.shape, self.conds, self.model_options)device = self.model_patcher.load_device- noise = noise.to(device)- latent_image = latent_image.to(device)+ noise = noise.to(device=device, dtype=torch.float32)+ latent_image = latent_image.to(device=device, dtype=torch.float32)sigmas = sigmas.to(device)cast_to_load_options(self.model_options, device=device, dtype=self.model_patcher.model_dtype())@@ -1028,6 +1028,7 @@ class CFGGuider:denoise_mask, _ = comfy.utils.pack_latents(denoise_masks)else:denoise_mask = denoise_masks[0]+ denoise_mask = denoise_mask.float()self.conds = {}for k in self.original_conds: