mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-10 06:10:50 +08:00
fix torch error and suggestion-mode
This commit is contained in:
parent
2261f18306
commit
170b8348a3
@ -106,14 +106,14 @@ source-roots=
|
||||
|
||||
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||
# user-friendly hints instead of false-positive error messages.
|
||||
suggestion-mode=yes
|
||||
# suggestion-mode=yes
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
# In verbose mode, extra non-checker-related info will be displayed.
|
||||
#verbose=
|
||||
# verbose=
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
@ -143,13 +143,13 @@ class AudioAutoencoder(nn.Module):
|
||||
mel_decoded = self.vae.decode(z)
|
||||
audio = self.vocoder(mel_decoded)
|
||||
|
||||
import torchaudio
|
||||
import torchaudio # pylint: disable=import-error, noqa: F401
|
||||
audio = torchaudio.functional.resample(audio, 16000, 44100)
|
||||
return audio
|
||||
|
||||
@torch.no_grad()
|
||||
def encode(self, audio):
|
||||
import torchaudio
|
||||
import torchaudio # pylint: disable=import-error, noqa: F401
|
||||
audio = audio.mean(dim=1)
|
||||
audio = torchaudio.functional.resample(audio, 44100, 16000)
|
||||
dist = self.encode_audio(audio)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user