Spaces:
Running on Zero
Running on Zero
LING commited on
Commit ·
f0349f3
1
Parent(s): b8e61a0
Fix device mismatch on ZeroGPU: update self.device inside @spaces.GPU.
Browse files1490 unmodified lines1491149214931494149514961490 unmodified linesstart_time = time.time()if audio2audio_enable and ref_audio_input is not None:task = "audio2audio"1490 unmodified lines1491149214931494149514961497149814991500150115021503150415051490 unmodified linesstart_time = time.time()# ZeroGPU allocates a GPU only inside @spaces.GPU, so self.device# (set during __init__ without a GPU) is "cpu". Update it now.if self.device.type != "cuda" and torch.cuda.is_available():self.device = torch.device("cuda:0")if self.loaded:self.music_dcae.to(self.device)self.ace_step_transformer.to(self.device)self.text_encoder_model.to(self.device)if audio2audio_enable and ref_audio_input is not None:task = "audio2audio"
pipeline_ace_step.py+9