kijai / ComfyUI-SUPIR

SUPIR upscaling wrapper for ComfyUI
Other
1.1k stars 62 forks source link

m1 max , The Python environment will simply crash #74

Open yiwangsimple opened 2 months ago

yiwangsimple commented 2 months ago

sampler_config: {'target': '.sgm.modules.diffusionmodules.sampling.RestoreDPMPP2MSampler', 'params': {'num_steps': 10, 'restore_cfg': -1, 's_churn': 5, 's_noise': 1.0030000000000001, 'discretization_config': {'target': '.sgm.modules.diffusionmodules.discretizer.LegacyDDPMDiscretization'}, 'guider_config': {'target': '.sgm.modules.diffusionmodules.guiders.LinearCFG', 'params': {'scale': 1.5, 'scale_min': 1.5}}, 'eta': 1.0}} loc("mps_add"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/c2cb9645-dafc-11ed-aa26-6ec1e3b3f7b3/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":228:0)): error: input types 'tensor<2x1280xf32>' and 'tensor<1280xf16>' are not broadcast compatible LLVM ERROR: Failed to infer result type(s).

kijai commented 2 months ago

I don't think the pipeline works with MPS and fp16, as far as I know you would have to use fp32, but I don't have a mac to know.

r-darwish commented 2 weeks ago

I can confirm that fp32 works on a Mac. Here's an example workflow. SUPIR macOS.json Also, the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1 has to be set