Files
custom-nodes-security-scan/docs/ComfyUI-DeepFuze-bandit.html
zeekay 6bdea42e64 rebrand: Hanzo AI Inc — full rebrand from ComfyUI/Comfy-Org
- Updated copyright to Hanzo AI, Inc.
- Replaced ComfyUI references with Hanzo Studio
- Updated GitHub org URLs (Comfy-Org → hanzoui)
- Updated domains (comfy.org → hanzo.ai)
- Updated package names and npm scopes
- Updated LICENSE with Hanzo AI copyright header
2026-02-23 10:54:25 -08:00

20658 lines
950 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>
Bandit Report
</title>
<style>
html * {
font-family: "Arial", sans-serif;
}
pre {
font-family: "Monaco", monospace;
}
.bordered-box {
border: 1px solid black;
padding-top:.5em;
padding-bottom:.5em;
padding-left:1em;
}
.metrics-box {
font-size: 1.1em;
line-height: 130%;
}
.metrics-title {
font-size: 1.5em;
font-weight: 500;
margin-bottom: .25em;
}
.issue-description {
font-size: 1.3em;
font-weight: 500;
}
.candidate-issues {
margin-left: 2em;
border-left: solid 1px; LightGray;
padding-left: 5%;
margin-top: .2em;
margin-bottom: .2em;
}
.issue-block {
border: 1px solid LightGray;
padding-left: .5em;
padding-top: .5em;
padding-bottom: .5em;
margin-bottom: .5em;
}
.issue-sev-high {
background-color: Pink;
}
.issue-sev-medium {
background-color: NavajoWhite;
}
.issue-sev-low {
background-color: LightCyan;
}
</style>
</head>
<body>
<div id="metrics">
<div class="metrics-box bordered-box">
<div class="metrics-title">
Metrics:<br>
</div>
Total lines of code: <span id="loc">59473</span><br>
Total lines skipped (#nosec): <span id="nosec">0</span>
</div>
</div>
<br>
<div id="results">
<div id="issue-0">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/configs/base_encoder_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/configs/base_encoder_config.py</a><br>
<b>Line number: </b>59<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
55
56 def check_values(self):
57 super().check_values()
58 c = asdict(self)
59 assert (
60 c[&quot;model_params&quot;][&quot;input_dim&quot;] == self.audio.num_mels
61 ), &quot; [!] model input dimendion must be equal to melspectrogram dimension.&quot;
</pre>
</div>
</div>
</div>
<div id="issue-1">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/dataset.py</a><br>
<b>Line number: </b>129<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
125 # get classid
126 class_id = self.classname_to_classid[class_name]
127 # load wav file
128 wav = self.load_wav(utter_path)
129 offset = random.randint(0, wav.shape[0] - self.seq_len)
130 wav = wav[offset : offset + self.seq_len]
131
132 if self.augmentator is not None and self.data_augmentation_p:
</pre>
</div>
</div>
</div>
<div id="issue-2">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/dataset.py</a><br>
<b>Line number: </b>133<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
129 offset = random.randint(0, wav.shape[0] - self.seq_len)
130 wav = wav[offset : offset + self.seq_len]
131
132 if self.augmentator is not None and self.data_augmentation_p:
133 if random.random() &lt; self.data_augmentation_p:
134 wav = self.augmentator.apply_one(wav)
135
136 if not self.use_torch_spec:
</pre>
</div>
</div>
</div>
<div id="issue-3">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/losses.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/losses.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
24 self.loss_method = loss_method
25
26 print(&quot; &gt; Initialized Generalized End-to-End loss&quot;)
27
28 assert self.loss_method in [&quot;softmax&quot;, &quot;contrast&quot;]
29
30 if self.loss_method == &quot;softmax&quot;:
31 self.embed_loss = self.embed_loss_softmax
</pre>
</div>
</div>
</div>
<div id="issue-4">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/losses.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/losses.py</a><br>
<b>Line number: </b>111<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
107 &quot;&quot;&quot;
108 Calculates the GE2E loss for an input of dimensions (num_speakers, num_utts_per_speaker, dvec_feats)
109 &quot;&quot;&quot;
110
111 assert x.size()[1] &gt;= 2
112
113 centroids = torch.mean(x, 1)
114 cos_sim_matrix = self.calc_cosine_sim(x, centroids)
</pre>
</div>
</div>
</div>
<div id="issue-5">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/losses.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/losses.py</a><br>
<b>Line number: </b>149<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
145 &quot;&quot;&quot;
146 Calculates the AngleProto loss for an input of dimensions (num_speakers, num_utts_per_speaker, dvec_feats)
147 &quot;&quot;&quot;
148
149 assert x.size()[1] &gt;= 2
150
151 out_anchor = torch.mean(x[:, 1:, :], 1)
152 out_positive = x[:, 0, :]
</pre>
</div>
</div>
</div>
<div id="issue-6">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/models/base_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/models/base_encoder.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
15 self.coefficient = coefficient
16 self.register_buffer(&quot;filter&quot;, torch.FloatTensor([-self.coefficient, 1.0]).unsqueeze(0).unsqueeze(0))
17
18 def forward(self, x):
19 assert len(x.size()) == 2
20
21 x = torch.nn.functional.pad(x.unsqueeze(1), (1, 0), &quot;reflect&quot;)
22 return torch.nn.functional.conv1d(x, self.filter).squeeze(1)
</pre>
</div>
</div>
</div>
<div id="issue-7">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/models/base_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/models/base_encoder.py</a><br>
<b>Line number: </b>157<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
153 criterion = criterion.cuda()
154
155 if eval:
156 self.eval()
157 assert not self.training
158
159 if not eval:
160 return criterion, state[&quot;step&quot;]
</pre>
</div>
</div>
</div>
<div id="issue-8">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py</a><br>
<b>Line number: </b>70<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
66 clean_db = 10 * np.log10(np.mean(audio**2) + 1e-4)
67
68 noise_list = random.sample(
69 self.noise_list[noise_type],
70 random.randint(
71 self.additive_noise_config[noise_type][&quot;min_num_noises&quot;],
72 self.additive_noise_config[noise_type][&quot;max_num_noises&quot;],
73 ),
74 )
75
76 audio_len = audio.shape[0]
</pre>
</div>
</div>
</div>
<div id="issue-9">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py</a><br>
<b>Line number: </b>84<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
80
81 if noiseaudio.shape[0] &lt; audio_len:
82 continue
83
84 noise_snr = random.uniform(
85 self.additive_noise_config[noise_type][&quot;min_snr_in_db&quot;],
86 self.additive_noise_config[noise_type][&quot;max_num_noises&quot;],
87 )
88 noise_db = 10 * np.log10(np.mean(noiseaudio**2) + 1e-4)
89 noise_wav = np.sqrt(10 ** ((clean_db - noise_db - noise_snr) / 10)) * noiseaudio
90
</pre>
</div>
</div>
</div>
<div id="issue-10">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py</a><br>
<b>Line number: </b>105<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
101
102 def reverberate(self, audio):
103 audio_len = audio.shape[0]
104
105 rir_file = random.choice(self.rir_files)
106 rir = self.ap.load_wav(rir_file, sr=self.ap.sample_rate)
107 rir = rir / np.sqrt(np.sum(rir**2))
108 return signal.convolve(audio, rir, mode=self.rir_config[&quot;conv_mode&quot;])[:audio_len]
</pre>
</div>
</div>
</div>
<div id="issue-11">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/generic_utils.py</a><br>
<b>Line number: </b>111<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
107 rir = rir / np.sqrt(np.sum(rir**2))
108 return signal.convolve(audio, rir, mode=self.rir_config[&quot;conv_mode&quot;])[:audio_len]
109
110 def apply_one(self, audio):
111 noise_type = random.choice(self.global_noise_list)
112 if noise_type == &quot;RIR_AUG&quot;:
113 return self.reverberate(audio)
114
</pre>
</div>
</div>
</div>
<div id="issue-12">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
20 &quot;&quot;&quot; voxceleb 1 &amp; 2 &quot;&quot;&quot;
21
22 import hashlib
23 import os
24 import subprocess
25 import sys
26 import zipfile
27
</pre>
</div>
</div>
</div>
<div id="issue-13">
<div class="issue-block issue-sev-high">
<b>subprocess_popen_with_shell_equals_true: </b> subprocess call with shell=True identified, security issue.<br>
<b>Test ID:</b> B602<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py</a><br>
<b>Line number: </b>83<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html</a><br>
<div class="code">
<pre>
79 continue
80 logging.info(&quot;Downloading %s to %s&quot; % (url, zip_filepath))
81 subprocess.call(
82 &quot;wget %s --user %s --password %s -O %s&quot; % (url, USER[&quot;user&quot;], USER[&quot;password&quot;], zip_filepath),
83 shell=True,
84 )
85
86 statinfo = os.stat(zip_filepath)
87 logging.info(&quot;Successfully downloaded %s, size(bytes): %d&quot; % (url, statinfo.st_size))
88
89 # concatenate all parts into zip files
</pre>
</div>
</div>
</div>
<div id="issue-14">
<div class="issue-block issue-sev-high">
<b>subprocess_popen_with_shell_equals_true: </b> subprocess call with shell=True identified, security issue.<br>
<b>Test ID:</b> B602<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py</a><br>
<b>Line number: </b>92<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html</a><br>
<div class="code">
<pre>
88
89 # concatenate all parts into zip files
90 if &quot;.zip&quot; not in zip_filepath:
91 zip_filepath = &quot;_&quot;.join(zip_filepath.split(&quot;_&quot;)[:-1])
92 subprocess.call(&quot;cat %s* &gt; %s.zip&quot; % (zip_filepath, zip_filepath), shell=True)
93 zip_filepath += &quot;.zip&quot;
94 extract_path = zip_filepath.strip(&quot;.zip&quot;)
95
</pre>
</div>
</div>
</div>
<div id="issue-15">
<div class="issue-block issue-sev-high">
<b>hashlib: </b> Use of weak MD5 hash for security. Consider usedforsecurity=False<br>
<b>Test ID:</b> B324<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/327.html" target="_blank">CWE-327</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py</a><br>
<b>Line number: </b>98<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html</a><br>
<div class="code">
<pre>
94 extract_path = zip_filepath.strip(&quot;.zip&quot;)
95
96 # check zip file md5sum
97 with open(zip_filepath, &quot;rb&quot;) as f_zip:
98 md5 = hashlib.md5(f_zip.read()).hexdigest()
99 if md5 != MD5SUM[subset]:
100 raise ValueError(&quot;md5sum of %s mismatch&quot; % zip_filepath)
101
</pre>
</div>
</div>
</div>
<div id="issue-16">
<div class="issue-block issue-sev-high">
<b>subprocess_popen_with_shell_equals_true: </b> subprocess call with shell=True identified, security issue.<br>
<b>Test ID:</b> B602<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py</a><br>
<b>Line number: </b>105<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html</a><br>
<div class="code">
<pre>
101
102 with zipfile.ZipFile(zip_filepath, &quot;r&quot;) as zfile:
103 zfile.extractall(directory)
104 extract_path_ori = os.path.join(directory, zfile.infolist()[0].filename)
105 subprocess.call(&quot;mv %s %s&quot; % (extract_path_ori, extract_path), shell=True)
106 finally:
107 # os.remove(zip_filepath)
108 pass
</pre>
</div>
</div>
</div>
<div id="issue-17">
<div class="issue-block issue-sev-high">
<b>subprocess_popen_with_shell_equals_true: </b> subprocess call with shell=True identified, security issue.<br>
<b>Test ID:</b> B602<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/encoder/utils/prepare_voxceleb.py</a><br>
<b>Line number: </b>119<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b602_subprocess_popen_with_shell_equals_true.html</a><br>
<div class="code">
<pre>
115 Return:
116 int, the return code.
117 &quot;&quot;&quot;
118 try:
119 retcode = subprocess.call(cmd, shell=True)
120 if retcode &lt; 0:
121 logging.info(f&quot;Child was terminated by signal {retcode}&quot;)
122 except OSError as e:
</pre>
</div>
</div>
</div>
<div id="issue-18">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/neuralhmm_tts_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/neuralhmm_tts_config.py</a><br>
<b>Line number: </b>164<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
160 Raises:
161 AssertionError: when the parameters network is not defined
162 AssertionError: transition probability is not between 0 and 1
163 &quot;&quot;&quot;
164 assert self.ar_order &gt; 0, &quot;AR order must be greater than 0 it is an autoregressive model.&quot;
165 assert (
166 len(self.outputnet_size) &gt;= 1
167 ), f&quot;Parameter Network must have atleast one layer check the config file for parameter network. Provided: {self.parameternetwork}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-19">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/neuralhmm_tts_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/neuralhmm_tts_config.py</a><br>
<b>Line number: </b>165<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
161 AssertionError: when the parameters network is not defined
162 AssertionError: transition probability is not between 0 and 1
163 &quot;&quot;&quot;
164 assert self.ar_order &gt; 0, &quot;AR order must be greater than 0 it is an autoregressive model.&quot;
165 assert (
166 len(self.outputnet_size) &gt;= 1
167 ), f&quot;Parameter Network must have atleast one layer check the config file for parameter network. Provided: {self.parameternetwork}&quot;
168 assert (
169 0 &lt; self.flat_start_params[&quot;transition_p&quot;] &lt; 1
170 ), f&quot;Transition probability must be between 0 and 1. Provided: {self.flat_start_params[&#x27;transition_p&#x27;]}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-20">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/neuralhmm_tts_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/neuralhmm_tts_config.py</a><br>
<b>Line number: </b>168<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
164 assert self.ar_order &gt; 0, &quot;AR order must be greater than 0 it is an autoregressive model.&quot;
165 assert (
166 len(self.outputnet_size) &gt;= 1
167 ), f&quot;Parameter Network must have atleast one layer check the config file for parameter network. Provided: {self.parameternetwork}&quot;
168 assert (
169 0 &lt; self.flat_start_params[&quot;transition_p&quot;] &lt; 1
170 ), f&quot;Transition probability must be between 0 and 1. Provided: {self.flat_start_params[&#x27;transition_p&#x27;]}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-21">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/overflow_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/overflow_config.py</a><br>
<b>Line number: </b>195<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
191 Raises:
192 AssertionError: when the parameters network is not defined
193 AssertionError: transition probability is not between 0 and 1
194 &quot;&quot;&quot;
195 assert self.ar_order &gt; 0, &quot;AR order must be greater than 0 it is an autoregressive model.&quot;
196 assert (
197 len(self.outputnet_size) &gt;= 1
198 ), f&quot;Parameter Network must have atleast one layer check the config file for parameter network. Provided: {self.parameternetwork}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-22">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/overflow_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/overflow_config.py</a><br>
<b>Line number: </b>196<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
192 AssertionError: when the parameters network is not defined
193 AssertionError: transition probability is not between 0 and 1
194 &quot;&quot;&quot;
195 assert self.ar_order &gt; 0, &quot;AR order must be greater than 0 it is an autoregressive model.&quot;
196 assert (
197 len(self.outputnet_size) &gt;= 1
198 ), f&quot;Parameter Network must have atleast one layer check the config file for parameter network. Provided: {self.parameternetwork}&quot;
199 assert (
200 0 &lt; self.flat_start_params[&quot;transition_p&quot;] &lt; 1
201 ), f&quot;Transition probability must be between 0 and 1. Provided: {self.flat_start_params[&#x27;transition_p&#x27;]}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-23">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/overflow_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/overflow_config.py</a><br>
<b>Line number: </b>199<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
195 assert self.ar_order &gt; 0, &quot;AR order must be greater than 0 it is an autoregressive model.&quot;
196 assert (
197 len(self.outputnet_size) &gt;= 1
198 ), f&quot;Parameter Network must have atleast one layer check the config file for parameter network. Provided: {self.parameternetwork}&quot;
199 assert (
200 0 &lt; self.flat_start_params[&quot;transition_p&quot;] &lt; 1
201 ), f&quot;Transition probability must be between 0 and 1. Provided: {self.flat_start_params[&#x27;transition_p&#x27;]}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-24">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/tacotron_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/tacotron_config.py</a><br>
<b>Line number: </b>227<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
223 )
224
225 def check_values(self):
226 if self.gradual_training:
227 assert (
228 self.gradual_training[0][1] == self.r
229 ), f&quot;[!] the first scheduled gradual training `r` must be equal to the model&#x27;s `r` value. {self.gradual_training[0][1]} vs {self.r}&quot;
230 if self.model == &quot;tacotron&quot; and self.audio is not None:
231 assert self.out_channels == (
232 self.audio.fft_size // 2 + 1
</pre>
</div>
</div>
</div>
<div id="issue-25">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/tacotron_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/tacotron_config.py</a><br>
<b>Line number: </b>231<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
227 assert (
228 self.gradual_training[0][1] == self.r
229 ), f&quot;[!] the first scheduled gradual training `r` must be equal to the model&#x27;s `r` value. {self.gradual_training[0][1]} vs {self.r}&quot;
230 if self.model == &quot;tacotron&quot; and self.audio is not None:
231 assert self.out_channels == (
232 self.audio.fft_size // 2 + 1
233 ), f&quot;{self.out_channels} vs {self.audio.fft_size // 2 + 1}&quot;
234 if self.model == &quot;tacotron2&quot; and self.audio is not None:
235 assert self.out_channels == self.audio.num_mels
</pre>
</div>
</div>
</div>
<div id="issue-26">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/tacotron_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/configs/tacotron_config.py</a><br>
<b>Line number: </b>235<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
231 assert self.out_channels == (
232 self.audio.fft_size // 2 + 1
233 ), f&quot;{self.out_channels} vs {self.audio.fft_size // 2 + 1}&quot;
234 if self.model == &quot;tacotron2&quot; and self.audio is not None:
235 assert self.out_channels == self.audio.num_mels
</pre>
</div>
</div>
</div>
<div id="issue-27">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/__init__.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/__init__.py</a><br>
<b>Line number: </b>37<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
33 eval_split_size = min(eval_split_max_size, int(len(items) * eval_split_size))
34 else:
35 eval_split_size = int(len(items) * eval_split_size)
36
37 assert (
38 eval_split_size &gt; 0
39 ), &quot; [!] You do not have enough samples for the evaluation set. You can work around this setting the &#x27;eval_split_size&#x27; parameter to a minimum of {}&quot;.format(
40 1 / len(items)
41 )
42 np.random.seed(0)
43 np.random.shuffle(items)
44 if is_multi_speaker:
</pre>
</div>
</div>
</div>
<div id="issue-28">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/__init__.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/__init__.py</a><br>
<b>Line number: </b>121<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
117 if formatter is None:
118 formatter = _get_formatter_by_name(formatter_name)
119 # load train set
120 meta_data_train = formatter(root_path, meta_file_train, ignored_speakers=ignored_speakers)
121 assert len(meta_data_train) &gt; 0, f&quot; [!] No training samples found in {root_path}/{meta_file_train}&quot;
122
123 meta_data_train = add_extra_keys(meta_data_train, language, dataset_name)
124
</pre>
</div>
</div>
</div>
<div id="issue-29">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>224<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
220 print(f&quot;{indent}| &gt; Number of instances : {len(self.samples)}&quot;)
221
222 def load_wav(self, filename):
223 waveform = self.ap.load_wav(filename)
224 assert waveform.size &gt; 0
225 return waveform
226
227 def get_phonemes(self, idx, text):
</pre>
</div>
</div>
</div>
<div id="issue-30">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>229<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
225 return waveform
226
227 def get_phonemes(self, idx, text):
228 out_dict = self.phoneme_dataset[idx]
229 assert text == out_dict[&quot;text&quot;], f&quot;{text} != {out_dict[&#x27;text&#x27;]}&quot;
230 assert len(out_dict[&quot;token_ids&quot;]) &gt; 0
231 return out_dict
232
</pre>
</div>
</div>
</div>
<div id="issue-31">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>230<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
226
227 def get_phonemes(self, idx, text):
228 out_dict = self.phoneme_dataset[idx]
229 assert text == out_dict[&quot;text&quot;], f&quot;{text} != {out_dict[&#x27;text&#x27;]}&quot;
230 assert len(out_dict[&quot;token_ids&quot;]) &gt; 0
231 return out_dict
232
233 def get_f0(self, idx):
</pre>
</div>
</div>
</div>
<div id="issue-32">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>236<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
232
233 def get_f0(self, idx):
234 out_dict = self.f0_dataset[idx]
235 item = self.samples[idx]
236 assert item[&quot;audio_unique_name&quot;] == out_dict[&quot;audio_unique_name&quot;]
237 return out_dict
238
239 def get_energy(self, idx):
</pre>
</div>
</div>
</div>
<div id="issue-33">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>242<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
238
239 def get_energy(self, idx):
240 out_dict = self.energy_dataset[idx]
241 item = self.samples[idx]
242 assert item[&quot;audio_unique_name&quot;] == out_dict[&quot;audio_unique_name&quot;]
243 return out_dict
244
245 @staticmethod
</pre>
</div>
</div>
</div>
<div id="issue-34">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>337<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
333 return idxs
334
335 @staticmethod
336 def create_buckets(samples, batch_group_size: int):
337 assert batch_group_size &gt; 0
338 for i in range(len(samples) // batch_group_size):
339 offset = i * batch_group_size
340 end_offset = offset + batch_group_size
</pre>
</div>
</div>
</div>
<div id="issue-35">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>503<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
499 if self.compute_linear_spec:
500 linear = [self.ap.spectrogram(w).astype(&quot;float32&quot;) for w in batch[&quot;wav&quot;]]
501 linear = prepare_tensor(linear, self.outputs_per_step)
502 linear = linear.transpose(0, 2, 1)
503 assert mel.shape[1] == linear.shape[1]
504 linear = torch.FloatTensor(linear).contiguous()
505
506 # format waveforms
</pre>
</div>
</div>
</div>
<div id="issue-36">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>523<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
519
520 # format F0
521 if self.compute_f0:
522 pitch = prepare_data(batch[&quot;pitch&quot;])
523 assert mel.shape[1] == pitch.shape[1], f&quot;[!] {mel.shape} vs {pitch.shape}&quot;
524 pitch = torch.FloatTensor(pitch)[:, None, :].contiguous() # B x 1 xT
525 else:
526 pitch = None
</pre>
</div>
</div>
</div>
<div id="issue-37">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>530<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
526 pitch = None
527 # format energy
528 if self.compute_energy:
529 energy = prepare_data(batch[&quot;energy&quot;])
530 assert mel.shape[1] == energy.shape[1], f&quot;[!] {mel.shape} vs {energy.shape}&quot;
531 energy = torch.FloatTensor(energy)[:, None, :].contiguous() # B x 1 xT
532 else:
533 energy = None
</pre>
</div>
</div>
</div>
<div id="issue-38">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>541<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
537 attns = [batch[&quot;attn&quot;][idx].T for idx in ids_sorted_decreasing]
538 for idx, attn in enumerate(attns):
539 pad2 = mel.shape[1] - attn.shape[1]
540 pad1 = token_ids.shape[1] - attn.shape[0]
541 assert pad1 &gt;= 0 and pad2 &gt;= 0, f&quot;[!] Negative padding - {pad1} and {pad2}&quot;
542 attn = np.pad(attn, [[0, pad1], [0, pad2]])
543 attns[idx] = attn
544 attns = prepare_tensor(attns, self.outputs_per_step)
</pre>
</div>
</div>
</div>
<div id="issue-39">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>724<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
720 def __getitem__(self, idx):
721 item = self.samples[idx]
722 f0 = self.compute_or_load(item[&quot;audio_file&quot;], string2filename(item[&quot;audio_unique_name&quot;]))
723 if self.normalize_f0:
724 assert self.mean is not None and self.std is not None, &quot; [!] Mean and STD is not available&quot;
725 f0 = self.normalize(f0)
726 return {&quot;audio_unique_name&quot;: item[&quot;audio_unique_name&quot;], &quot;f0&quot;: f0}
727
</pre>
</div>
</div>
</div>
<div id="issue-40">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/dataset.py</a><br>
<b>Line number: </b>875<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
871 def __getitem__(self, idx):
872 item = self.samples[idx]
873 energy = self.compute_or_load(item[&quot;audio_file&quot;], string2filename(item[&quot;audio_unique_name&quot;]))
874 if self.normalize_energy:
875 assert self.mean is not None and self.std is not None, &quot; [!] Mean and STD is not available&quot;
876 energy = self.normalize(energy)
877 return {&quot;audio_unique_name&quot;: item[&quot;audio_unique_name&quot;], &quot;energy&quot;: energy}
878
</pre>
</div>
</div>
</div>
<div id="issue-41">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Using xml.etree.ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.<br>
<b>Test ID:</b> B405<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/20.html" target="_blank">CWE-20</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py</a><br>
<b>Line number: </b>3<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b405-import-xml-etree" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b405-import-xml-etree</a><br>
<div class="code">
<pre>
1 import os
2 import re
3 import xml.etree.ElementTree as ET
4 from glob import glob
5 from pathlib import Path
6 from typing import List
7
8 import pandas as pd
</pre>
</div>
</div>
</div>
<div id="issue-42">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py</a><br>
<b>Line number: </b>29<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
25 if len(line.split(&quot;|&quot;)) != num_cols:
26 print(f&quot; &gt; Missing column in line {idx + 1} -&gt; {line.strip()}&quot;)
27 # load metadata
28 metadata = pd.read_csv(os.path.join(root_path, meta_file), sep=&quot;|&quot;)
29 assert all(x in metadata.columns for x in [&quot;wav_filename&quot;, &quot;transcript&quot;])
30 client_id = None if &quot;client_id&quot; in metadata.columns else &quot;default&quot;
31 emotion_name = None if &quot;emotion_name&quot; in metadata.columns else &quot;neutral&quot;
32 items = []
</pre>
</div>
</div>
</div>
<div id="issue-43">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py</a><br>
<b>Line number: </b>67<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
63 if len(line.split(&quot;|&quot;)) != num_cols:
64 print(f&quot; &gt; Missing column in line {idx + 1} -&gt; {line.strip()}&quot;)
65 # load metadata
66 metadata = pd.read_csv(os.path.join(root_path, meta_file), sep=&quot;|&quot;)
67 assert all(x in metadata.columns for x in [&quot;audio_file&quot;, &quot;text&quot;])
68 speaker_name = None if &quot;speaker_name&quot; in metadata.columns else &quot;coqui&quot;
69 emotion_name = None if &quot;emotion_name&quot; in metadata.columns else &quot;neutral&quot;
70 items = []
</pre>
</div>
</div>
</div>
<div id="issue-44">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Using xml.etree.ElementTree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.parse with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called<br>
<b>Test ID:</b> B314<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/20.html" target="_blank">CWE-20</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py</a><br>
<b>Line number: </b>245<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b313-b320-xml-bad-elementtree" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b313-b320-xml-bad-elementtree</a><br>
<div class="code">
<pre>
241 def sam_accenture(root_path, meta_file, **kwargs): # pylint: disable=unused-argument
242 &quot;&quot;&quot;Normalizes the sam-accenture meta data file to TTS format
243 https://github.com/Sam-Accenture-Non-Binary-Voice/non-binary-voice-files&quot;&quot;&quot;
244 xml_file = os.path.join(root_path, &quot;voice_over_recordings&quot;, meta_file)
245 xml_root = ET.parse(xml_file).getroot()
246 items = []
247 speaker_name = &quot;sam_accenture&quot;
248 for item in xml_root.findall(&quot;./fileid&quot;):
</pre>
</div>
</div>
</div>
<div id="issue-45">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py</a><br>
<b>Line number: </b>355<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
351 &quot;root_path&quot;: root_path,
352 }
353 )
354 for item in items:
355 assert os.path.exists(item[&quot;audio_file&quot;]), f&quot; [!] wav files don&#x27;t exist - {item[&#x27;audio_file&#x27;]}&quot;
356 return items
357
358
</pre>
</div>
</div>
</div>
<div id="issue-46">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py</a><br>
<b>Line number: </b>541<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
537 return _voxcel_x(root_path, meta_file, voxcel_idx=&quot;1&quot;)
538
539
540 def _voxcel_x(root_path, meta_file, voxcel_idx):
541 assert voxcel_idx in [&quot;1&quot;, &quot;2&quot;]
542 expected_count = 148_000 if voxcel_idx == &quot;1&quot; else 1_000_000
543 voxceleb_path = Path(root_path)
544 cache_to = voxceleb_path / f&quot;metafile_voxceleb{voxcel_idx}.csv&quot;
</pre>
</div>
</div>
</div>
<div id="issue-47">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/datasets/formatters.py</a><br>
<b>Line number: </b>562<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
558 desc=f&quot;Building VoxCeleb {voxcel_idx} Meta file ... this needs to be done only once.&quot;,
559 total=expected_count,
560 ):
561 speaker_id = str(Path(path).parent.parent.stem)
562 assert speaker_id.startswith(&quot;id&quot;)
563 text = None # VoxCel does not provide transciptions, and they are not needed for training the SE
564 meta_data.append(f&quot;{text}|{path}|voxcel{voxcel_idx}_{speaker_id}\n&quot;)
565 cnt += 1
</pre>
</div>
</div>
</div>
<div id="issue-48">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.<br>
<b>Test ID:</b> B310<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/hubert/hubert_manager.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/hubert/hubert_manager.py</a><br>
<b>Line number: </b>17<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen</a><br>
<div class="code">
<pre>
13 download_url: str = &quot;https://dl.fbaipublicfiles.com/hubert/hubert_base_ls960.pt&quot;, model_path: str = &quot;&quot;
14 ):
15 if not os.path.isfile(model_path):
16 print(&quot;Downloading HuBERT base model&quot;)
17 urllib.request.urlretrieve(download_url, model_path)
18 print(&quot;Downloaded HuBERT&quot;)
19 return model_path
20 return None
</pre>
</div>
</div>
</div>
<div id="issue-49">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>187<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
183
184 Returns:
185 np.ndarray: The generated semantic tokens.
186 &quot;&quot;&quot;
187 assert isinstance(text, str)
188 text = _normalize_whitespace(text)
189 assert len(text.strip()) &gt; 0
190 if all(v is not None for v in history_prompt) or base is not None:
</pre>
</div>
</div>
</div>
<div id="issue-50">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>189<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
185 np.ndarray: The generated semantic tokens.
186 &quot;&quot;&quot;
187 assert isinstance(text, str)
188 text = _normalize_whitespace(text)
189 assert len(text.strip()) &gt; 0
190 if all(v is not None for v in history_prompt) or base is not None:
191 if history_prompt is not None:
192 semantic_history = history_prompt[0]
</pre>
</div>
</div>
</div>
<div id="issue-51">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>195<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
191 if history_prompt is not None:
192 semantic_history = history_prompt[0]
193 if base is not None:
194 semantic_history = base[0]
195 assert (
196 isinstance(semantic_history, np.ndarray)
197 and len(semantic_history.shape) == 1
198 and len(semantic_history) &gt; 0
199 and semantic_history.min() &gt;= 0
200 and semantic_history.max() &lt;= model.config.SEMANTIC_VOCAB_SIZE - 1
201 )
202 else:
203 semantic_history = None
204 encoded_text = np.array(_tokenize(model.tokenizer, text)) + model.config.TEXT_ENCODING_OFFSET
</pre>
</div>
</div>
</div>
<div id="issue-52">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>230<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
226 semantic_history = np.array([model.config.SEMANTIC_PAD_TOKEN] * 256)
227 x = torch.from_numpy(
228 np.hstack([encoded_text, semantic_history, np.array([model.config.SEMANTIC_INFER_TOKEN])]).astype(np.int64)
229 )[None]
230 assert x.shape[1] == 256 + 256 + 1
231 with inference_mode():
232 x = x.to(model.device)
233 n_tot_steps = 768
</pre>
</div>
</div>
</div>
<div id="issue-53">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>292<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
288 pbar.update(req_pbar_state - pbar_state)
289 pbar_state = req_pbar_state
290 pbar.close()
291 out = x.detach().cpu().numpy().squeeze()[256 + 256 + 1 :]
292 assert all(out &gt;= 0) and all(out &lt; model.config.SEMANTIC_VOCAB_SIZE)
293 clear_cuda_cache()
294 return out
295
</pre>
</div>
</div>
</div>
<div id="issue-54">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>298<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
294 return out
295
296
297 def _flatten_codebooks(arr, offset_size):
298 assert len(arr.shape) == 2
299 arr = arr.copy()
300 if offset_size is not None:
301 for n in range(1, arr.shape[0]):
</pre>
</div>
</div>
</div>
<div id="issue-55">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>338<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
334
335 Returns:
336 np.ndarray: The generated coarse audio codes.
337 &quot;&quot;&quot;
338 assert (
339 isinstance(x_semantic, np.ndarray)
340 and len(x_semantic.shape) == 1
341 and len(x_semantic) &gt; 0
342 and x_semantic.min() &gt;= 0
343 and x_semantic.max() &lt;= model.config.SEMANTIC_VOCAB_SIZE - 1
344 )
345 assert 60 &lt;= max_coarse_history &lt;= 630
346 assert max_coarse_history + sliding_window_len &lt;= 1024 - 256
347 semantic_to_coarse_ratio = (
</pre>
</div>
</div>
</div>
<div id="issue-56">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>345<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
341 and len(x_semantic) &gt; 0
342 and x_semantic.min() &gt;= 0
343 and x_semantic.max() &lt;= model.config.SEMANTIC_VOCAB_SIZE - 1
344 )
345 assert 60 &lt;= max_coarse_history &lt;= 630
346 assert max_coarse_history + sliding_window_len &lt;= 1024 - 256
347 semantic_to_coarse_ratio = (
348 model.config.COARSE_RATE_HZ / model.config.SEMANTIC_RATE_HZ * model.config.N_COARSE_CODEBOOKS
</pre>
</div>
</div>
</div>
<div id="issue-57">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>346<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
342 and x_semantic.min() &gt;= 0
343 and x_semantic.max() &lt;= model.config.SEMANTIC_VOCAB_SIZE - 1
344 )
345 assert 60 &lt;= max_coarse_history &lt;= 630
346 assert max_coarse_history + sliding_window_len &lt;= 1024 - 256
347 semantic_to_coarse_ratio = (
348 model.config.COARSE_RATE_HZ / model.config.SEMANTIC_RATE_HZ * model.config.N_COARSE_CODEBOOKS
349 )
</pre>
</div>
</div>
</div>
<div id="issue-58">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>359<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
355 x_coarse_history = x_history[1]
356 if base is not None:
357 x_semantic_history = base[0]
358 x_coarse_history = base[1]
359 assert (
360 isinstance(x_semantic_history, np.ndarray)
361 and len(x_semantic_history.shape) == 1
362 and len(x_semantic_history) &gt; 0
363 and x_semantic_history.min() &gt;= 0
364 and x_semantic_history.max() &lt;= model.config.SEMANTIC_VOCAB_SIZE - 1
365 and isinstance(x_coarse_history, np.ndarray)
366 and len(x_coarse_history.shape) == 2
367 and x_coarse_history.shape[0] == model.config.N_COARSE_CODEBOOKS
368 and x_coarse_history.shape[-1] &gt;= 0
369 and x_coarse_history.min() &gt;= 0
370 and x_coarse_history.max() &lt;= model.config.CODEBOOK_SIZE - 1
371 and (
372 round(x_coarse_history.shape[-1] / len(x_semantic_history), 1)
373 == round(semantic_to_coarse_ratio / model.config.N_COARSE_CODEBOOKS, 1)
374 )
375 )
376 x_coarse_history = (
377 _flatten_codebooks(x_coarse_history, model.config.CODEBOOK_SIZE) + model.config.SEMANTIC_VOCAB_SIZE
378 )
</pre>
</div>
</div>
</div>
<div id="issue-59">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>402<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
398 np.floor(len(x_semantic) * semantic_to_coarse_ratio / model.config.N_COARSE_CODEBOOKS)
399 * model.config.N_COARSE_CODEBOOKS
400 )
401 )
402 assert n_steps &gt; 0 and n_steps % model.config.N_COARSE_CODEBOOKS == 0
403 x_semantic = np.hstack([x_semantic_history, x_semantic]).astype(np.int32)
404 x_coarse = x_coarse_history.astype(np.int32)
405 base_semantic_idx = len(x_semantic_history)
</pre>
</div>
</div>
</div>
<div id="issue-60">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>474<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
470 del x_in
471 del x_semantic_in
472 gen_coarse_arr = x_coarse_in.detach().cpu().numpy().squeeze()[len(x_coarse_history) :]
473 del x_coarse_in
474 assert len(gen_coarse_arr) == n_steps
475 gen_coarse_audio_arr = (
476 gen_coarse_arr.reshape(-1, model.config.N_COARSE_CODEBOOKS).T - model.config.SEMANTIC_VOCAB_SIZE
477 )
</pre>
</div>
</div>
</div>
<div id="issue-61">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>505<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
501
502 Returns:
503 np.ndarray: The generated full audio codes.
504 &quot;&quot;&quot;
505 assert (
506 isinstance(x_coarse_gen, np.ndarray)
507 and len(x_coarse_gen.shape) == 2
508 and 1 &lt;= x_coarse_gen.shape[0] &lt;= model.config.N_FINE_CODEBOOKS - 1
509 and x_coarse_gen.shape[1] &gt; 0
510 and x_coarse_gen.min() &gt;= 0
511 and x_coarse_gen.max() &lt;= model.config.CODEBOOK_SIZE - 1
512 )
513 if all(v is not None for v in history_prompt) or base is not None:
514 if history_prompt is not None:
515 x_fine_history = history_prompt[2]
</pre>
</div>
</div>
</div>
<div id="issue-62">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>518<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
514 if history_prompt is not None:
515 x_fine_history = history_prompt[2]
516 if base is not None:
517 x_fine_history = base[2]
518 assert (
519 isinstance(x_fine_history, np.ndarray)
520 and len(x_fine_history.shape) == 2
521 and x_fine_history.shape[0] == model.config.N_FINE_CODEBOOKS
522 and x_fine_history.shape[1] &gt;= 0
523 and x_fine_history.min() &gt;= 0
524 and x_fine_history.max() &lt;= model.config.CODEBOOK_SIZE - 1
525 )
526 else:
527 x_fine_history = None
528 n_coarse = x_coarse_gen.shape[0]
</pre>
</div>
</div>
</div>
<div id="issue-63">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/inference_funcs.py</a><br>
<b>Line number: </b>593<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
589 del in_arr
590 gen_fine_arr = gen_fine_arr[:, n_history:]
591 if n_remove_from_end &gt; 0:
592 gen_fine_arr = gen_fine_arr[:, :-n_remove_from_end]
593 assert gen_fine_arr.shape[-1] == x_coarse_gen.shape[-1]
594 clear_cuda_cache()
595 return gen_fine_arr
596
</pre>
</div>
</div>
</div>
<div id="issue-64">
<div class="issue-block issue-sev-high">
<b>hashlib: </b> Use of weak MD5 hash for security. Consider usedforsecurity=False<br>
<b>Test ID:</b> B324<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/327.html" target="_blank">CWE-327</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/load_model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/load_model.py</a><br>
<b>Line number: </b>41<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html</a><br>
<div class="code">
<pre>
37 )
38
39
40 def _md5(fname):
41 hash_md5 = hashlib.md5()
42 with open(fname, &quot;rb&quot;) as f:
43 for chunk in iter(lambda: f.read(4096), b&quot;&quot;):
44 hash_md5.update(chunk)
</pre>
</div>
</div>
</div>
<div id="issue-65">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/load_model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/load_model.py</a><br>
<b>Line number: </b>50<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
46
47
48 def _download(from_s3_path, to_local_path, CACHE_DIR):
49 os.makedirs(CACHE_DIR, exist_ok=True)
50 response = requests.get(from_s3_path, stream=True)
51 total_size_in_bytes = int(response.headers.get(&quot;content-length&quot;, 0))
52 block_size = 1024 # 1 Kibibyte
53 progress_bar = tqdm.tqdm(total=total_size_in_bytes, unit=&quot;iB&quot;, unit_scale=True)
</pre>
</div>
</div>
</div>
<div id="issue-66">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>29<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
25
26 class CausalSelfAttention(nn.Module):
27 def __init__(self, config):
28 super().__init__()
29 assert config.n_embd % config.n_head == 0
30 # key, query, value projections for all heads, but in a batch
31 self.c_attn = nn.Linear(config.n_embd, 3 * config.n_embd, bias=config.bias)
32 # output projection
</pre>
</div>
</div>
</div>
<div id="issue-67">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>149<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
145
146 class GPT(nn.Module):
147 def __init__(self, config):
148 super().__init__()
149 assert config.input_vocab_size is not None
150 assert config.output_vocab_size is not None
151 assert config.block_size is not None
152 self.config = config
</pre>
</div>
</div>
</div>
<div id="issue-68">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>150<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
146 class GPT(nn.Module):
147 def __init__(self, config):
148 super().__init__()
149 assert config.input_vocab_size is not None
150 assert config.output_vocab_size is not None
151 assert config.block_size is not None
152 self.config = config
153
</pre>
</div>
</div>
</div>
<div id="issue-69">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>151<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
147 def __init__(self, config):
148 super().__init__()
149 assert config.input_vocab_size is not None
150 assert config.output_vocab_size is not None
151 assert config.block_size is not None
152 self.config = config
153
154 self.transformer = nn.ModuleDict(
</pre>
</div>
</div>
</div>
<div id="issue-70">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>182<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
178 def forward(self, idx, merge_context=False, past_kv=None, position_ids=None, use_cache=False):
179 device = idx.device
180 _, t = idx.size()
181 if past_kv is not None:
182 assert t == 1
183 tok_emb = self.transformer.wte(idx) # token embeddings of shape (b, t, n_embd)
184 else:
185 if merge_context:
</pre>
</div>
</div>
</div>
<div id="issue-71">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>186<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
182 assert t == 1
183 tok_emb = self.transformer.wte(idx) # token embeddings of shape (b, t, n_embd)
184 else:
185 if merge_context:
186 assert idx.shape[1] &gt;= 256 + 256 + 1
187 t = idx.shape[1] - 256
188 else:
189 assert (
</pre>
</div>
</div>
</div>
<div id="issue-72">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>189<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
185 if merge_context:
186 assert idx.shape[1] &gt;= 256 + 256 + 1
187 t = idx.shape[1] - 256
188 else:
189 assert (
190 t &lt;= self.config.block_size
191 ), f&quot;Cannot forward sequence of length {t}, block size is only {self.config.block_size}&quot;
192
193 # forward the GPT model itself
194 if merge_context:
</pre>
</div>
</div>
</div>
<div id="issue-73">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model.py</a><br>
<b>Line number: </b>214<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
210
211 if position_ids is None:
212 position_ids = torch.arange(past_length, t + past_length, dtype=torch.long, device=device)
213 position_ids = position_ids.unsqueeze(0) # shape (1, t)
214 assert position_ids.shape == (1, t)
215
216 pos_emb = self.transformer.wpe(position_ids) # position embeddings of shape (1, t, n_embd)
217
</pre>
</div>
</div>
</div>
<div id="issue-74">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py</a><br>
<b>Line number: </b>18<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
14
15 class NonCausalSelfAttention(nn.Module):
16 def __init__(self, config):
17 super().__init__()
18 assert config.n_embd % config.n_head == 0
19 # key, query, value projections for all heads, but in a batch
20 self.c_attn = nn.Linear(config.n_embd, 3 * config.n_embd, bias=config.bias)
21 # output projection
</pre>
</div>
</div>
</div>
<div id="issue-75">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py</a><br>
<b>Line number: </b>103<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
99
100 def forward(self, pred_idx, idx):
101 device = idx.device
102 b, t, codes = idx.size()
103 assert (
104 t &lt;= self.config.block_size
105 ), f&quot;Cannot forward sequence of length {t}, block size is only {self.config.block_size}&quot;
106 assert pred_idx &gt; 0, &quot;cannot predict 0th codebook&quot;
107 assert codes == self.n_codes_total, (b, t, codes)
108 pos = torch.arange(0, t, dtype=torch.long, device=device).unsqueeze(0) # shape (1, t)
</pre>
</div>
</div>
</div>
<div id="issue-76">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py</a><br>
<b>Line number: </b>106<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
102 b, t, codes = idx.size()
103 assert (
104 t &lt;= self.config.block_size
105 ), f&quot;Cannot forward sequence of length {t}, block size is only {self.config.block_size}&quot;
106 assert pred_idx &gt; 0, &quot;cannot predict 0th codebook&quot;
107 assert codes == self.n_codes_total, (b, t, codes)
108 pos = torch.arange(0, t, dtype=torch.long, device=device).unsqueeze(0) # shape (1, t)
109
</pre>
</div>
</div>
</div>
<div id="issue-77">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/bark/model_fine.py</a><br>
<b>Line number: </b>107<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
103 assert (
104 t &lt;= self.config.block_size
105 ), f&quot;Cannot forward sequence of length {t}, block size is only {self.config.block_size}&quot;
106 assert pred_idx &gt; 0, &quot;cannot predict 0th codebook&quot;
107 assert codes == self.n_codes_total, (b, t, codes)
108 pos = torch.arange(0, t, dtype=torch.long, device=device).unsqueeze(0) # shape (1, t)
109
110 # forward the GPT model itself
</pre>
</div>
</div>
</div>
<div id="issue-78">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/conformer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/conformer.py</a><br>
<b>Line number: </b>357<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
353 d_model: int = 512,
354 num_heads: int = 16,
355 ):
356 super().__init__()
357 assert d_model % num_heads == 0, &quot;d_model % num_heads should be zero.&quot;
358 self.d_model = d_model
359 self.d_head = int(d_model / num_heads)
360 self.num_heads = num_heads
</pre>
</div>
</div>
</div>
<div id="issue-79">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/conv_layers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/conv_layers.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
56 use_weight_norm=False,
57 ):
58 super(ConvNorm, self).__init__() # pylint: disable=super-with-arguments
59 if padding is None:
60 assert kernel_size % 2 == 1
61 padding = int(dilation * (kernel_size - 1) / 2)
62 self.kernel_size = kernel_size
63 self.dilation = dilation
</pre>
</div>
</div>
</div>
<div id="issue-80">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/conv_layers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/conv_layers.py</a><br>
<b>Line number: </b>644<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
640 (Tensor): the output sequence after performing local convolution. (batch, out_channels, in_length).
641 &quot;&quot;&quot;
642 batch, _, in_length = x.shape
643 batch, _, out_channels, kernel_size, kernel_length = kernel.shape
644 assert in_length == (kernel_length * hop_size), &quot;length of (x, kernel) is not matched&quot;
645
646 padding = dilation * int((kernel_size - 1) / 2)
647 x = F.pad(x, (padding, padding), &quot;constant&quot;, 0) # (batch, in_channels, in_length + 2*padding)
</pre>
</div>
</div>
</div>
<div id="issue-81">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/networks.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/delightful_tts/networks.py</a><br>
<b>Line number: </b>13<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
9 from TTS.tts.layers.delightful_tts.conv_layers import ConvNorm
10
11
12 def initialize_embeddings(shape: Tuple[int]) -&gt; torch.Tensor:
13 assert len(shape) == 2, &quot;Can only initialize 2-D embedding matrices ...&quot;
14 # Kaiming initialization
15 return torch.randn(shape) * np.sqrt(2 / shape[1])
16
</pre>
</div>
</div>
</div>
<div id="issue-82">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/feed_forward/encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/feed_forward/encoder.py</a><br>
<b>Line number: </b>146<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
142 )
143 elif encoder_type.lower() == &quot;residual_conv_bn&quot;:
144 self.encoder = ResidualConv1dBNEncoder(in_hidden_channels, out_channels, in_hidden_channels, encoder_params)
145 elif encoder_type.lower() == &quot;fftransformer&quot;:
146 assert (
147 in_hidden_channels == out_channels
148 ), &quot;[!] must be `in_channels` == `out_channels` when encoder type is &#x27;fftransformer&#x27;&quot;
149 # pylint: disable=unexpected-keyword-arg
150 self.encoder = FFTransformerBlock(in_hidden_channels, **encoder_params)
151 else:
</pre>
</div>
</div>
</div>
<div id="issue-83">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/res_conv_bn.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/res_conv_bn.py</a><br>
<b>Line number: </b>104<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
100 def __init__(
101 self, in_channels, out_channels, hidden_channels, kernel_size, dilations, num_res_blocks=13, num_conv_blocks=2
102 ):
103 super().__init__()
104 assert len(dilations) == num_res_blocks
105 self.res_blocks = nn.ModuleList()
106 for idx, dilation in enumerate(dilations):
107 block = Conv1dBNBlock(
</pre>
</div>
</div>
</div>
<div id="issue-84">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/time_depth_sep_conv.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/time_depth_sep_conv.py</a><br>
<b>Line number: </b>63<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
59
60 class TimeDepthSeparableConvBlock(nn.Module):
61 def __init__(self, in_channels, hid_channels, out_channels, num_layers, kernel_size, bias=True):
62 super().__init__()
63 assert (kernel_size - 1) % 2 == 0
64 assert num_layers &gt; 1
65
66 self.layers = nn.ModuleList()
</pre>
</div>
</div>
</div>
<div id="issue-85">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/time_depth_sep_conv.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/time_depth_sep_conv.py</a><br>
<b>Line number: </b>64<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
60 class TimeDepthSeparableConvBlock(nn.Module):
61 def __init__(self, in_channels, hid_channels, out_channels, num_layers, kernel_size, bias=True):
62 super().__init__()
63 assert (kernel_size - 1) % 2 == 0
64 assert num_layers &gt; 1
65
66 self.layers = nn.ModuleList()
67 layer = TimeDepthSeparableConv(
</pre>
</div>
</div>
</div>
<div id="issue-86">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/wavenet.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/wavenet.py</a><br>
<b>Line number: </b>49<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
45 dropout_p=0,
46 weight_norm=True,
47 ):
48 super().__init__()
49 assert kernel_size % 2 == 1
50 assert hidden_channels % 2 == 0
51 self.in_channels = in_channels
52 self.hidden_channels = hidden_channels
</pre>
</div>
</div>
</div>
<div id="issue-87">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/wavenet.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/generic/wavenet.py</a><br>
<b>Line number: </b>50<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
46 weight_norm=True,
47 ):
48 super().__init__()
49 assert kernel_size % 2 == 1
50 assert hidden_channels % 2 == 0
51 self.in_channels = in_channels
52 self.hidden_channels = hidden_channels
53 self.kernel_size = kernel_size
</pre>
</div>
</div>
</div>
<div id="issue-88">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py</a><br>
<b>Line number: </b>37<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
33 self.out_channels = out_channels
34 self.kernel_size = kernel_size
35 self.num_layers = num_layers
36 self.dropout_p = dropout_p
37 assert num_layers &gt; 1, &quot; [!] number of layers should be &gt; 0.&quot;
38 assert kernel_size % 2 == 1, &quot; [!] kernel size should be odd number.&quot;
39
40 self.conv_layers = nn.ModuleList()
</pre>
</div>
</div>
</div>
<div id="issue-89">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py</a><br>
<b>Line number: </b>38<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
34 self.kernel_size = kernel_size
35 self.num_layers = num_layers
36 self.dropout_p = dropout_p
37 assert num_layers &gt; 1, &quot; [!] number of layers should be &gt; 0.&quot;
38 assert kernel_size % 2 == 1, &quot; [!] kernel size should be odd number.&quot;
39
40 self.conv_layers = nn.ModuleList()
41 self.norm_layers = nn.ModuleList()
</pre>
</div>
</div>
</div>
<div id="issue-90">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py</a><br>
<b>Line number: </b>87<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
83 &quot;&quot;&quot;
84
85 def __init__(self, channels, num_splits=4, no_jacobian=False, **kwargs): # pylint: disable=unused-argument
86 super().__init__()
87 assert num_splits % 2 == 0
88 self.channels = channels
89 self.num_splits = num_splits
90 self.no_jacobian = no_jacobian
</pre>
</div>
</div>
</div>
<div id="issue-91">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/glow.py</a><br>
<b>Line number: </b>109<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
105 - x: :math:`[B, C, T]`
106 - x_mask: :math:`[B, 1, T]`
107 &quot;&quot;&quot;
108 b, c, t = x.size()
109 assert c % self.num_splits == 0
110 if x_mask is None:
111 x_mask = 1
112 x_len = torch.ones((b,), dtype=x.dtype, device=x.device) * t
</pre>
</div>
</div>
</div>
<div id="issue-92">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/transformer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/transformer.py</a><br>
<b>Line number: </b>68<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
64 proximal_bias=False,
65 proximal_init=False,
66 ):
67 super().__init__()
68 assert channels % num_heads == 0, &quot; [!] channels should be divisible by num_heads.&quot;
69 # class attributes
70 self.channels = channels
71 self.out_channels = out_channels
</pre>
</div>
</div>
</div>
<div id="issue-93">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/transformer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/transformer.py</a><br>
<b>Line number: </b>133<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
129 # compute raw attention scores
130 scores = torch.matmul(query, key.transpose(-2, -1)) / math.sqrt(self.k_channels)
131 # relative positional encoding for scores
132 if self.rel_attn_window_size is not None:
133 assert t_s == t_t, &quot;Relative attention is only available for self-attention.&quot;
134 # get relative key embeddings
135 key_relative_embeddings = self._get_relative_embeddings(self.emb_rel_k, t_s)
136 rel_logits = self._matmul_with_relative_keys(query, key_relative_embeddings)
</pre>
</div>
</div>
</div>
<div id="issue-94">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/transformer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/glow_tts/transformer.py</a><br>
<b>Line number: </b>142<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
138 scores_local = rel_logits / math.sqrt(self.k_channels)
139 scores = scores + scores_local
140 # proximan bias
141 if self.proximal_bias:
142 assert t_s == t_t, &quot;Proximal bias is only available for self-attention.&quot;
143 scores = scores + self._attn_proximity_bias(t_s).to(device=scores.device, dtype=scores.dtype)
144 # attention score masking
145 if mask is not None:
</pre>
</div>
</div>
</div>
<div id="issue-95">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/overflow/neural_hmm.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/overflow/neural_hmm.py</a><br>
<b>Line number: </b>77<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
73
74 self.transition_model = TransitionModel()
75 self.emission_model = EmissionModel()
76
77 assert ar_order &gt; 0, f&quot;AR order must be greater than 0 provided {ar_order}&quot;
78
79 self.ar_order = ar_order
80 self.prenet = Prenet(
</pre>
</div>
</div>
</div>
<div id="issue-96">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tacotron/tacotron.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tacotron/tacotron.py</a><br>
<b>Line number: </b>172<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
168 for conv1d in self.conv1d_banks:
169 out = conv1d(x)
170 outs.append(out)
171 x = torch.cat(outs, dim=1)
172 assert x.size(1) == self.conv_bank_features * len(self.conv1d_banks)
173 for conv1d in self.conv1d_projections:
174 x = conv1d(x)
175 x += inputs
</pre>
</div>
</div>
</div>
<div id="issue-97">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tacotron/tacotron2.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tacotron/tacotron2.py</a><br>
<b>Line number: </b>27<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
23 &quot;&quot;&quot;
24
25 def __init__(self, in_channels, out_channels, kernel_size, activation=None):
26 super().__init__()
27 assert (kernel_size - 1) % 2 == 0
28 padding = (kernel_size - 1) // 2
29 self.convolution1d = nn.Conv1d(in_channels, out_channels, kernel_size, padding=padding)
30 self.batch_normalization = nn.BatchNorm1d(out_channels, momentum=0.1, eps=1e-5)
</pre>
</div>
</div>
</div>
<div id="issue-98">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>43<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
39 elif channels &lt;= 64:
40 groups = 16
41 while channels % groups != 0:
42 groups = int(groups / 2)
43 assert groups &gt; 2
44 return GroupNorm32(groups, channels)
45
46
</pre>
</div>
</div>
</div>
<div id="issue-99">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>64<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
60 :param qkv: an [N x (H * 3 * C) x T] tensor of Qs, Ks, and Vs.
61 :return: an [N x (H * C) x T] tensor after attention.
62 &quot;&quot;&quot;
63 bs, width, length = qkv.shape
64 assert width % (3 * self.n_heads) == 0
65 ch = width // (3 * self.n_heads)
66 q, k, v = qkv.reshape(bs * self.n_heads, ch * 3, length).split(ch, dim=1)
67 scale = 1 / math.sqrt(math.sqrt(ch))
</pre>
</div>
</div>
</div>
<div id="issue-100">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>105<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
101 self.do_checkpoint = do_checkpoint
102 if num_head_channels == -1:
103 self.num_heads = num_heads
104 else:
105 assert (
106 channels % num_head_channels == 0
107 ), f&quot;q,k,v channels {channels} is not divisible by num_head_channels {num_head_channels}&quot;
108 self.num_heads = channels // num_head_channels
109 self.norm = normalization(channels)
110 self.qkv = nn.Conv1d(channels, channels * 3, 1)
</pre>
</div>
</div>
</div>
<div id="issue-101">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>155<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
151 pad = 2
152 self.conv = nn.Conv1d(self.channels, self.out_channels, ksize, padding=pad)
153
154 def forward(self, x):
155 assert x.shape[1] == self.channels
156 x = F.interpolate(x, scale_factor=self.factor, mode=&quot;nearest&quot;)
157 if self.use_conv:
158 x = self.conv(x)
</pre>
</div>
</div>
</div>
<div id="issue-102">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>180<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
176 stride = factor
177 if use_conv:
178 self.op = nn.Conv1d(self.channels, self.out_channels, ksize, stride=stride, padding=pad)
179 else:
180 assert self.channels == self.out_channels
181 self.op = nn.AvgPool1d(kernel_size=stride, stride=stride)
182
183 def forward(self, x):
</pre>
</div>
</div>
</div>
<div id="issue-103">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>184<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
180 assert self.channels == self.out_channels
181 self.op = nn.AvgPool1d(kernel_size=stride, stride=stride)
182
183 def forward(self, x):
184 assert x.shape[1] == self.channels
185 return self.op(x)
186
187
</pre>
</div>
</div>
</div>
<div id="issue-104">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>345<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
341 if (
342 len(inp.shape) == 3
343 ): # Automatically squeeze out the channels dimension if it is present (assuming mono-audio)
344 inp = inp.squeeze(1)
345 assert len(inp.shape) == 2
346 self.mel_stft = self.mel_stft.to(inp.device)
347 mel = self.mel_stft(inp)
348 # Perform dynamic range compression
</pre>
</div>
</div>
</div>
<div id="issue-105">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/arch_utils.py</a><br>
<b>Line number: </b>368<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
364 self.wrap = wrap
365
366 def forward(self, x, *args, **kwargs):
367 for k, v in kwargs.items():
368 assert not (isinstance(v, torch.Tensor) and v.requires_grad) # This would screw up checkpointing.
369 partial = functools.partial(self.wrap, **kwargs)
370 return partial(x, *args)
371
</pre>
</div>
</div>
</div>
<div id="issue-106">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py</a><br>
<b>Line number: </b>42<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
38 elif audiopath[-4:] == &quot;.mp3&quot;:
39 audio, lsr = librosa.load(audiopath, sr=None)
40 audio = torch.FloatTensor(audio)
41 else:
42 assert False, f&quot;Unsupported audio format provided: {audiopath[-4:]}&quot;
43
44 # Remove any channel data.
45 if len(audio.shape) &gt; 1:
</pre>
</div>
</div>
</div>
<div id="issue-107">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py</a><br>
<b>Line number: </b>49<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
45 if len(audio.shape) &gt; 1:
46 if audio.shape[0] &lt; 5:
47 audio = audio[0]
48 else:
49 assert audio.shape[1] &lt; 5
50 audio = audio[:, 0]
51
52 return audio, lsr
</pre>
</div>
</div>
</div>
<div id="issue-108">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py</a><br>
<b>Line number: </b>143<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
139 print(&quot;Cannot combine a random voice with a non-random voice. Just using a random voice.&quot;)
140 return None, None
141 clip, latent = load_voice(voice, extra_voice_dirs)
142 if latent is None:
143 assert (
144 len(latents) == 0
145 ), &quot;Can only combine raw audio voices or latent voices, not both. Do it yourself if you want this.&quot;
146 clips.extend(clip)
147 elif clip is None:
148 assert (
</pre>
</div>
</div>
</div>
<div id="issue-109">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/audio_utils.py</a><br>
<b>Line number: </b>148<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
144 len(latents) == 0
145 ), &quot;Can only combine raw audio voices or latent voices, not both. Do it yourself if you want this.&quot;
146 clips.extend(clip)
147 elif clip is None:
148 assert (
149 len(clips) == 0
150 ), &quot;Can only combine raw audio voices or latent voices, not both. Do it yourself if you want this.&quot;
151 latents.append(latent)
152 if len(latents) == 0:
153 return clips, None
</pre>
</div>
</div>
</div>
<div id="issue-110">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py</a><br>
<b>Line number: </b>99<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
95 output_attentions=None,
96 output_hidden_states=None,
97 return_dict=None,
98 ):
99 assert self.cached_mel_emb is not None
100 assert inputs_embeds is None # Not supported by this inference model.
101 assert labels is None # Training not supported by this inference model.
102 return_dict = return_dict if return_dict is not None else self.config.use_return_dict
</pre>
</div>
</div>
</div>
<div id="issue-111">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py</a><br>
<b>Line number: </b>100<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
96 output_hidden_states=None,
97 return_dict=None,
98 ):
99 assert self.cached_mel_emb is not None
100 assert inputs_embeds is None # Not supported by this inference model.
101 assert labels is None # Training not supported by this inference model.
102 return_dict = return_dict if return_dict is not None else self.config.use_return_dict
103
</pre>
</div>
</div>
</div>
<div id="issue-112">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py</a><br>
<b>Line number: </b>101<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
97 return_dict=None,
98 ):
99 assert self.cached_mel_emb is not None
100 assert inputs_embeds is None # Not supported by this inference model.
101 assert labels is None # Training not supported by this inference model.
102 return_dict = return_dict if return_dict is not None else self.config.use_return_dict
103
104 # Create embedding
</pre>
</div>
</div>
</div>
<div id="issue-113">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/autoregressive.py</a><br>
<b>Line number: </b>586<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
582 trunc_index = fake_inputs.shape[1]
583 if input_tokens is None:
584 inputs = fake_inputs
585 else:
586 assert (
587 num_return_sequences % input_tokens.shape[0] == 0
588 ), &quot;The number of return sequences must be divisible by the number of input sequences&quot;
589 fake_inputs = fake_inputs.repeat(num_return_sequences, 1)
590 input_tokens = input_tokens.repeat(num_return_sequences // input_tokens.shape[0], 1)
591 inputs = torch.cat([fake_inputs, input_tokens], dim=1)
</pre>
</div>
</div>
</div>
<div id="issue-114">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>43<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
39 for obj in (mean1, logvar1, mean2, logvar2):
40 if isinstance(obj, th.Tensor):
41 tensor = obj
42 break
43 assert tensor is not None, &quot;at least one argument must be a Tensor&quot;
44
45 # Force variances to be Tensors. Broadcasting helps convert scalars to
46 # Tensors, but it does not work for th.exp().
</pre>
</div>
</div>
</div>
<div id="issue-115">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>71<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
67 :param means: the Gaussian mean Tensor.
68 :param log_scales: the Gaussian log stddev Tensor.
69 :return: a tensor like x of log probabilities (in nats).
70 &quot;&quot;&quot;
71 assert x.shape == means.shape == log_scales.shape
72 centered_x = x - means
73 inv_stdv = th.exp(-log_scales)
74 plus_in = inv_stdv * (centered_x + 1.0 / 255.0)
</pre>
</div>
</div>
</div>
<div id="issue-116">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>86<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
82 x &lt; -0.999,
83 log_cdf_plus,
84 th.where(x &gt; 0.999, log_one_minus_cdf_min, th.log(cdf_delta.clamp(min=1e-12))),
85 )
86 assert log_probs.shape == x.shape
87 return log_probs
88
89
</pre>
</div>
</div>
</div>
<div id="issue-117">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>218<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
214
215 # Use float64 for accuracy.
216 betas = np.array(betas, dtype=np.float64)
217 self.betas = betas
218 assert len(betas.shape) == 1, &quot;betas must be 1-D&quot;
219 assert (betas &gt; 0).all() and (betas &lt;= 1).all()
220
221 self.num_timesteps = int(betas.shape[0])
</pre>
</div>
</div>
</div>
<div id="issue-118">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>219<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
215 # Use float64 for accuracy.
216 betas = np.array(betas, dtype=np.float64)
217 self.betas = betas
218 assert len(betas.shape) == 1, &quot;betas must be 1-D&quot;
219 assert (betas &gt; 0).all() and (betas &lt;= 1).all()
220
221 self.num_timesteps = int(betas.shape[0])
222
</pre>
</div>
</div>
</div>
<div id="issue-119">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>227<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
223 alphas = 1.0 - betas
224 self.alphas_cumprod = np.cumprod(alphas, axis=0)
225 self.alphas_cumprod_prev = np.append(1.0, self.alphas_cumprod[:-1])
226 self.alphas_cumprod_next = np.append(self.alphas_cumprod[1:], 0.0)
227 assert self.alphas_cumprod_prev.shape == (self.num_timesteps,)
228
229 # calculations for diffusion q(x_t | x_{t-1}) and others
230 self.sqrt_alphas_cumprod = np.sqrt(self.alphas_cumprod)
</pre>
</div>
</div>
</div>
<div id="issue-120">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>270<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
266 :return: A noisy version of x_start.
267 &quot;&quot;&quot;
268 if noise is None:
269 noise = th.randn_like(x_start)
270 assert noise.shape == x_start.shape
271 return (
272 _extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * x_start
273 + _extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.shape) * noise
</pre>
</div>
</div>
</div>
<div id="issue-121">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>283<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
279
280 q(x_{t-1} | x_t, x_0)
281
282 &quot;&quot;&quot;
283 assert x_start.shape == x_t.shape
284 posterior_mean = (
285 _extract_into_tensor(self.posterior_mean_coef1, t, x_t.shape) * x_start
286 + _extract_into_tensor(self.posterior_mean_coef2, t, x_t.shape) * x_t
</pre>
</div>
</div>
</div>
<div id="issue-122">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>290<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
286 + _extract_into_tensor(self.posterior_mean_coef2, t, x_t.shape) * x_t
287 )
288 posterior_variance = _extract_into_tensor(self.posterior_variance, t, x_t.shape)
289 posterior_log_variance_clipped = _extract_into_tensor(self.posterior_log_variance_clipped, t, x_t.shape)
290 assert (
291 posterior_mean.shape[0]
292 == posterior_variance.shape[0]
293 == posterior_log_variance_clipped.shape[0]
294 == x_start.shape[0]
295 )
296 return posterior_mean, posterior_variance, posterior_log_variance_clipped
297
298 def p_mean_variance(self, model, x, t, clip_denoised=True, denoised_fn=None, model_kwargs=None):
</pre>
</div>
</div>
</div>
<div id="issue-123">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>323<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
319 if model_kwargs is None:
320 model_kwargs = {}
321
322 B, C = x.shape[:2]
323 assert t.shape == (B,)
324 model_output = model(x, self._scale_timesteps(t), **model_kwargs)
325 if self.conditioning_free:
326 model_output_no_conditioning = model(x, self._scale_timesteps(t), conditioning_free=True, **model_kwargs)
</pre>
</div>
</div>
</div>
<div id="issue-124">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>329<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
325 if self.conditioning_free:
326 model_output_no_conditioning = model(x, self._scale_timesteps(t), conditioning_free=True, **model_kwargs)
327
328 if self.model_var_type in [ModelVarType.LEARNED, ModelVarType.LEARNED_RANGE]:
329 assert model_output.shape == (B, C * 2, *x.shape[2:])
330 model_output, model_var_values = th.split(model_output, C, dim=1)
331 if self.conditioning_free:
332 model_output_no_conditioning, _ = th.split(model_output_no_conditioning, C, dim=1)
</pre>
</div>
</div>
</div>
<div id="issue-125">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>361<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
357 model_log_variance = _extract_into_tensor(model_log_variance, t, x.shape)
358
359 if self.conditioning_free:
360 if self.ramp_conditioning_free:
361 assert t.shape[0] == 1 # This should only be used in inference.
362 cfk = self.conditioning_free_k * (1 - self._scale_timesteps(t)[0].item() / self.num_timesteps)
363 else:
364 cfk = self.conditioning_free_k
</pre>
</div>
</div>
</div>
<div id="issue-126">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>386<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
382 model_mean, _, _ = self.q_posterior_mean_variance(x_start=pred_xstart, x_t=x, t=t)
383 else:
384 raise NotImplementedError(self.model_mean_type)
385
386 assert model_mean.shape == model_log_variance.shape == pred_xstart.shape == x.shape
387 return {
388 &quot;mean&quot;: model_mean,
389 &quot;variance&quot;: model_variance,
</pre>
</div>
</div>
</div>
<div id="issue-127">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>395<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
391 &quot;pred_xstart&quot;: pred_xstart,
392 }
393
394 def _predict_xstart_from_eps(self, x_t, t, eps):
395 assert x_t.shape == eps.shape
396 return (
397 _extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t
398 - _extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * eps
</pre>
</div>
</div>
</div>
<div id="issue-128">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>402<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
398 - _extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * eps
399 )
400
401 def _predict_xstart_from_xprev(self, x_t, t, xprev):
402 assert x_t.shape == xprev.shape
403 return ( # (xprev - coef2*x_t) / coef1
404 _extract_into_tensor(1.0 / self.posterior_mean_coef1, t, x_t.shape) * xprev
405 - _extract_into_tensor(self.posterior_mean_coef2 / self.posterior_mean_coef1, t, x_t.shape) * x_t
</pre>
</div>
</div>
</div>
<div id="issue-129">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>465<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
461 device=None, # ALL UNUSED
462 model_kwargs=None, # {&#x27;precomputed_aligned_embeddings&#x27;: precomputed_embeddings},
463 progress=False, # unused as well
464 ):
465 assert isinstance(model_kwargs, dict)
466 if device is None:
467 device = next(model.parameters()).device
468 s_in = noise.new_ones([noise.shape[0]])
</pre>
</div>
</div>
</div>
<div id="issue-130">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>656<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
652 p_sample().
653 &quot;&quot;&quot;
654 if device is None:
655 device = next(model.parameters()).device
656 assert isinstance(shape, (tuple, list))
657 if noise is not None:
658 img = noise
659 else:
</pre>
</div>
</div>
</div>
<div id="issue-131">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>732<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
728 ):
729 &quot;&quot;&quot;
730 Sample x_{t+1} from the model using DDIM reverse ODE.
731 &quot;&quot;&quot;
732 assert eta == 0.0, &quot;Reverse ODE only for deterministic path&quot;
733 out = self.p_mean_variance(
734 model,
735 x,
</pre>
</div>
</div>
</div>
<div id="issue-132">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>808<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
804 Same usage as p_sample_loop_progressive().
805 &quot;&quot;&quot;
806 if device is None:
807 device = next(model.parameters()).device
808 assert isinstance(shape, (tuple, list))
809 if noise is not None:
810 img = noise
811 else:
</pre>
</div>
</div>
</div>
<div id="issue-133">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>856<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
852
853 decoder_nll = -discretized_gaussian_log_likelihood(
854 x_start, means=out[&quot;mean&quot;], log_scales=0.5 * out[&quot;log_variance&quot;]
855 )
856 assert decoder_nll.shape == x_start.shape
857 decoder_nll = mean_flat(decoder_nll) / np.log(2.0)
858
859 # At the first timestep return the decoder NLL,
</pre>
</div>
</div>
</div>
<div id="issue-134">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>910<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
906 ModelVarType.LEARNED,
907 ModelVarType.LEARNED_RANGE,
908 ]:
909 B, C = x_t.shape[:2]
910 assert model_output.shape == (B, C * 2, *x_t.shape[2:])
911 model_output, model_var_values = th.split(model_output, C, dim=1)
912 # Learn the variance using the variational bound, but don&#x27;t let
913 # it affect our mean prediction.
</pre>
</div>
</div>
</div>
<div id="issue-135">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>938<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
934 target = noise
935 x_start_pred = self._predict_xstart_from_eps(x_t, t, model_output)
936 else:
937 raise NotImplementedError(self.model_mean_type)
938 assert model_output.shape == target.shape == x_start.shape
939 terms[&quot;mse&quot;] = mean_flat((target - model_output) ** 2)
940 terms[&quot;x_start_predicted&quot;] = x_start_pred
941 if &quot;vb&quot; in terms:
</pre>
</div>
</div>
</div>
<div id="issue-136">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>972<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
968 noise = th.randn_like(x_start)
969 x_t = self.q_sample(x_start, t, noise=noise)
970 terms = {}
971 if self.loss_type == LossType.KL or self.loss_type == LossType.RESCALED_KL:
972 assert False # not currently supported for this type of diffusion.
973 elif self.loss_type == LossType.MSE or self.loss_type == LossType.RESCALED_MSE:
974 model_outputs = model(x_t, x_start, self._scale_timesteps(t), **model_kwargs)
975 terms.update({k: o for k, o in zip(model_output_keys, model_outputs)})
</pre>
</div>
</div>
</div>
<div id="issue-137">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>982<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
978 ModelVarType.LEARNED,
979 ModelVarType.LEARNED_RANGE,
980 ]:
981 B, C = x_t.shape[:2]
982 assert model_output.shape == (B, C, 2, *x_t.shape[2:])
983 model_output, model_var_values = model_output[:, :, 0], model_output[:, :, 1]
984 # Learn the variance using the variational bound, but don&#x27;t let
985 # it affect our mean prediction.
</pre>
</div>
</div>
</div>
<div id="issue-138">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion.py</a><br>
<b>Line number: </b>1010<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1006 target = noise
1007 x_start_pred = self._predict_xstart_from_eps(x_t, t, model_output)
1008 else:
1009 raise NotImplementedError(self.model_mean_type)
1010 assert model_output.shape == target.shape == x_start.shape
1011 terms[&quot;mse&quot;] = mean_flat((target - model_output) ** 2)
1012 terms[&quot;x_start_predicted&quot;] = x_start_pred
1013 if &quot;vb&quot; in terms:
</pre>
</div>
</div>
</div>
<div id="issue-139">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion_decoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion_decoder.py</a><br>
<b>Line number: </b>343<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
339 :param precomputed_aligned_embeddings: Embeddings returned from self.timestep_independent()
340 :param conditioning_free: When set, all conditioning inputs (including tokens and conditioning_input) will not be considered.
341 :return: an [N x C x ...] Tensor of outputs.
342 &quot;&quot;&quot;
343 assert precomputed_aligned_embeddings is not None or (
344 aligned_conditioning is not None and conditioning_latent is not None
345 )
346 assert not (
347 return_code_pred and precomputed_aligned_embeddings is not None
348 ) # These two are mutually exclusive.
</pre>
</div>
</div>
</div>
<div id="issue-140">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion_decoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion_decoder.py</a><br>
<b>Line number: </b>346<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
342 &quot;&quot;&quot;
343 assert precomputed_aligned_embeddings is not None or (
344 aligned_conditioning is not None and conditioning_latent is not None
345 )
346 assert not (
347 return_code_pred and precomputed_aligned_embeddings is not None
348 ) # These two are mutually exclusive.
349
350 unused_params = []
351 if conditioning_free:
</pre>
</div>
</div>
</div>
<div id="issue-141">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion_decoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/diffusion_decoder.py</a><br>
<b>Line number: </b>383<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
379 self.training
380 and self.layer_drop &gt; 0
381 and i != 0
382 and i != (len(self.layers) - 1)
383 and random.random() &lt; self.layer_drop
384 ):
385 unused_params.extend(list(lyr.parameters()))
386 else:
</pre>
</div>
</div>
</div>
<div id="issue-142">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>108<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
104 if schedule == &quot;discrete&quot;:
105 if betas is not None:
106 log_alphas = 0.5 * torch.log(1 - betas).cumsum(dim=0)
107 else:
108 assert alphas_cumprod is not None
109 log_alphas = 0.5 * torch.log(alphas_cumprod)
110 self.total_N = len(log_alphas)
111 self.T = 1.0
</pre>
</div>
</div>
</div>
<div id="issue-143">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>359<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
355 &quot;&quot;&quot;
356 if guidance_type == &quot;uncond&quot;:
357 return noise_pred_fn(x, t_continuous)
358 elif guidance_type == &quot;classifier&quot;:
359 assert classifier_fn is not None
360 t_input = get_model_input_time(t_continuous)
361 cond_grad = cond_grad_fn(x, t_input)
362 sigma_t = noise_schedule.marginal_std(t_continuous)
</pre>
</div>
</div>
</div>
<div id="issue-144">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>375<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
371 c_in = torch.cat([unconditional_condition, condition])
372 noise_uncond, noise = noise_pred_fn(x_in, t_in, cond=c_in).chunk(2)
373 return noise_uncond + guidance_scale * (noise - noise_uncond)
374
375 assert model_type in [&quot;noise&quot;, &quot;x_start&quot;, &quot;v&quot;, &quot;score&quot;]
376 assert guidance_type in [&quot;uncond&quot;, &quot;classifier&quot;, &quot;classifier-free&quot;]
377 return model_fn
378
</pre>
</div>
</div>
</div>
<div id="issue-145">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>376<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
372 noise_uncond, noise = noise_pred_fn(x_in, t_in, cond=c_in).chunk(2)
373 return noise_uncond + guidance_scale * (noise - noise_uncond)
374
375 assert model_type in [&quot;noise&quot;, &quot;x_start&quot;, &quot;v&quot;, &quot;score&quot;]
376 assert guidance_type in [&quot;uncond&quot;, &quot;classifier&quot;, &quot;classifier-free&quot;]
377 return model_fn
378
379
</pre>
</div>
</div>
</div>
<div id="issue-146">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>449<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
445 with deep language understanding. arXiv preprint arXiv:2205.11487, 2022b.
446 &quot;&quot;&quot;
447 self.model = lambda x, t: model_fn(x, t.expand((x.shape[0])))
448 self.noise_schedule = noise_schedule
449 assert algorithm_type in [&quot;dpmsolver&quot;, &quot;dpmsolver++&quot;]
450 self.algorithm_type = algorithm_type
451 if correcting_x0_fn == &quot;dynamic_thresholding&quot;:
452 self.correcting_x0_fn = self.dynamic_thresholding_fn
</pre>
</div>
</div>
</div>
<div id="issue-147">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>1219<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1215 For discrete-time DPMs, we use `t_start=1/N`, where `N` is the total time steps during training.
1216 &quot;&quot;&quot;
1217 t_0 = 1.0 / self.noise_schedule.total_N if t_start is None else t_start
1218 t_T = self.noise_schedule.T if t_end is None else t_end
1219 assert (
1220 t_0 &gt; 0 and t_T &gt; 0
1221 ), &quot;Time range needs to be greater than 0. For discrete-time DPMs, it needs to be in [1 / N, 1], where N is the length of betas array&quot;
1222 return self.sample(
1223 x,
1224 steps=steps,
</pre>
</div>
</div>
</div>
<div id="issue-148">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>1364<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1360
1361 &quot;&quot;&quot;
1362 t_0 = 1.0 / self.noise_schedule.total_N if t_end is None else t_end
1363 t_T = self.noise_schedule.T if t_start is None else t_start
1364 assert (
1365 t_0 &gt; 0 and t_T &gt; 0
1366 ), &quot;Time range needs to be greater than 0. For discrete-time DPMs, it needs to be in [1 / N, 1], where N is the length of betas array&quot;
1367 if return_intermediate:
1368 assert method in [
1369 &quot;multistep&quot;,
</pre>
</div>
</div>
</div>
<div id="issue-149">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>1368<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1364 assert (
1365 t_0 &gt; 0 and t_T &gt; 0
1366 ), &quot;Time range needs to be greater than 0. For discrete-time DPMs, it needs to be in [1 / N, 1], where N is the length of betas array&quot;
1367 if return_intermediate:
1368 assert method in [
1369 &quot;multistep&quot;,
1370 &quot;singlestep&quot;,
1371 &quot;singlestep_fixed&quot;,
1372 ], &quot;Cannot use adaptive solver when saving intermediate values&quot;
1373 if self.correcting_xt_fn is not None:
1374 assert method in [
1375 &quot;multistep&quot;,
</pre>
</div>
</div>
</div>
<div id="issue-150">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>1374<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1370 &quot;singlestep&quot;,
1371 &quot;singlestep_fixed&quot;,
1372 ], &quot;Cannot use adaptive solver when saving intermediate values&quot;
1373 if self.correcting_xt_fn is not None:
1374 assert method in [
1375 &quot;multistep&quot;,
1376 &quot;singlestep&quot;,
1377 &quot;singlestep_fixed&quot;,
1378 ], &quot;Cannot use adaptive solver when correcting_xt_fn is not None&quot;
1379 device = x.device
1380 intermediates = []
1381 with torch.no_grad():
</pre>
</div>
</div>
</div>
<div id="issue-151">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>1393<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1389 rtol=rtol,
1390 solver_type=solver_type,
1391 )
1392 elif method == &quot;multistep&quot;:
1393 assert steps &gt;= order
1394 timesteps = self.get_time_steps(skip_type=skip_type, t_T=t_T, t_0=t_0, N=steps, device=device)
1395 assert timesteps.shape[0] - 1 == steps
1396 # Init the initial values.
</pre>
</div>
</div>
</div>
<div id="issue-152">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/dpm_solver.py</a><br>
<b>Line number: </b>1395<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1391 )
1392 elif method == &quot;multistep&quot;:
1393 assert steps &gt;= order
1394 timesteps = self.get_time_steps(skip_type=skip_type, t_T=t_T, t_0=t_0, N=steps, device=device)
1395 assert timesteps.shape[0] - 1 == steps
1396 # Init the initial values.
1397 step = 0
1398 t = timesteps[step]
</pre>
</div>
</div>
</div>
<div id="issue-153">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/transformer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/transformer.py</a><br>
<b>Line number: </b>49<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
45 # classes
46 class SequentialSequence(nn.Module):
47 def __init__(self, layers, args_route={}, layer_dropout=0.0):
48 super().__init__()
49 assert all(
50 len(route) == len(layers) for route in args_route.values()
51 ), &quot;each argument route map must have the same depth as the number of sequential layers&quot;
52 self.layers = layers
53 self.args_route = args_route
54 self.layer_dropout = layer_dropout
</pre>
</div>
</div>
</div>
<div id="issue-154">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.<br>
<b>Test ID:</b> B310<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/utils.py</a><br>
<b>Line number: </b>33<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen</a><br>
<div class="code">
<pre>
29 if os.path.exists(model_path):
30 continue
31 print(f&quot;Downloading {model_name} from {url}...&quot;)
32 with tqdm(unit=&quot;B&quot;, unit_scale=True, unit_divisor=1024, miniters=1) as t:
33 request.urlretrieve(url, model_path, lambda nb, bs, fs, t=t: t.update(nb * bs - t.n))
34 print(&quot;Done.&quot;)
35
36
</pre>
</div>
</div>
</div>
<div id="issue-155">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/vocoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/vocoder.py</a><br>
<b>Line number: </b>247<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
243 (Tensor): the output sequence after performing local convolution. (batch, out_channels, in_length).
244 &quot;&quot;&quot;
245 batch, _, in_length = x.shape
246 batch, _, out_channels, kernel_size, kernel_length = kernel.shape
247 assert in_length == (kernel_length * hop_size), &quot;length of (x, kernel) is not matched&quot;
248
249 padding = dilation * int((kernel_size - 1) / 2)
250 x = F.pad(x, (padding, padding), &quot;constant&quot;, 0) # (batch, in_channels, in_length + 2*padding)
</pre>
</div>
</div>
</div>
<div id="issue-156">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/vocoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/vocoder.py</a><br>
<b>Line number: </b>402<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
398 print(c.shape)
399
400 y = model(c, z)
401 print(y.shape)
402 assert y.shape == torch.Size([3, 1, 2560])
403
404 pytorch_total_params = sum(p.numel() for p in model.parameters() if p.requires_grad)
405 print(pytorch_total_params)
</pre>
</div>
</div>
</div>
<div id="issue-157">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/wav2vec_alignment.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/wav2vec_alignment.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
11 Finally got to use my DP skills!
12 &quot;&quot;&quot;
13 if record is None:
14 record = {}
15 assert skip_character not in s1, f&quot;Found the skip character {skip_character} in the provided string, {s1}&quot;
16 if len(s1) == 0:
17 return &quot;&quot;
18 if len(s2) == 0:
</pre>
</div>
</div>
</div>
<div id="issue-158">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/wav2vec_alignment.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/wav2vec_alignment.py</a><br>
<b>Line number: </b>106<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
102
103 pop_till_you_win()
104 if not (len(expected_tokens) == 0 and len(alignments) == len(expected_text)):
105 torch.save([audio, expected_text], &quot;alignment_debug.pth&quot;)
106 assert False, (
107 &quot;Something went wrong with the alignment algorithm. I&#x27;ve dumped a file, &#x27;alignment_debug.pth&#x27; to&quot;
108 &quot;your current working directory. Please report this along with the file so it can get fixed.&quot;
109 )
110
111 # Now fix up alignments. Anything with -1 should be interpolated.
112 alignments.append(orig_len) # This&#x27;ll get removed but makes the algorithm below more readable.
</pre>
</div>
</div>
</div>
<div id="issue-159">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/wav2vec_alignment.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/wav2vec_alignment.py</a><br>
<b>Line number: </b>131<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
127 return audio
128 splitted = expected_text.split(&quot;[&quot;)
129 fully_split = [splitted[0]]
130 for spl in splitted[1:]:
131 assert &quot;]&quot; in spl, &#x27;Every &quot;[&quot; character must be paired with a &quot;]&quot; with no nesting.&#x27;
132 fully_split.extend(spl.split(&quot;]&quot;))
133
134 # At this point, fully_split is a list of strings, with every other string being something that should be redacted.
</pre>
</div>
</div>
</div>
<div id="issue-160">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>579<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
575 self.to_out = nn.Sequential(nn.Linear(v_dim, dim * 2), nn.GLU()) if on_attn else nn.Linear(v_dim, dim)
576
577 self.rel_pos_bias = rel_pos_bias
578 if rel_pos_bias:
579 assert (
580 rel_pos_num_buckets &lt;= rel_pos_max_distance
581 ), &quot;number of relative position buckets must be less than the relative position max distance&quot;
582 self.rel_pos = RelativePositionBias(
583 scale=dim_head**0.5,
584 causal=causal,
</pre>
</div>
</div>
</div>
<div id="issue-161">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>699<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
695 dots.masked_fill_(~input_mask, mask_value)
696 del input_mask
697
698 if exists(attn_mask):
699 assert (
700 2 &lt;= attn_mask.ndim &lt;= 4
701 ), &quot;attention mask must have greater than 2 dimensions but less than or equal to 4&quot;
702 if attn_mask.ndim == 2:
703 attn_mask = rearrange(attn_mask, &quot;i j -&gt; () () i j&quot;)
704 elif attn_mask.ndim == 3:
</pre>
</div>
</div>
</div>
<div id="issue-162">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>809<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
805
806 rotary_emb_dim = max(default(rotary_emb_dim, dim_head // 2), 32)
807 self.rotary_pos_emb = RotaryEmbedding(rotary_emb_dim) if rotary_pos_emb else None
808
809 assert not (
810 alibi_pos_bias and rel_pos_bias
811 ), &quot;you can only choose Alibi positional bias or T5 relative positional bias, not both&quot;
812
813 if alibi_pos_bias:
814 alibi_num_heads = default(alibi_num_heads, heads)
</pre>
</div>
</div>
</div>
<div id="issue-163">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>815<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
811 ), &quot;you can only choose Alibi positional bias or T5 relative positional bias, not both&quot;
812
813 if alibi_pos_bias:
814 alibi_num_heads = default(alibi_num_heads, heads)
815 assert alibi_num_heads &lt;= heads, &quot;number of ALiBi heads must be less than the total number of heads&quot;
816 alibi_pos_klass = LearnedAlibiPositionalBias if alibi_learned or not causal else AlibiPositionalBias
817 self.rel_pos = alibi_pos_klass(heads=alibi_num_heads, bidirectional=not causal)
818 else:
</pre>
</div>
</div>
</div>
<div id="issue-164">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>821<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
817 self.rel_pos = alibi_pos_klass(heads=alibi_num_heads, bidirectional=not causal)
818 else:
819 self.rel_pos = None
820
821 assert not (not pre_norm and sandwich_norm), &quot;sandwich norm cannot be used when not using prenorm&quot;
822 self.pre_norm = pre_norm
823 self.sandwich_norm = sandwich_norm
824
</pre>
</div>
</div>
</div>
<div id="issue-165">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>869<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
865 if exists(custom_layers):
866 layer_types = custom_layers
867 elif exists(par_ratio):
868 par_depth = depth * len(default_block)
869 assert 1 &lt; par_ratio &lt;= par_depth, &quot;par ratio out of range&quot;
870 default_block = tuple(filter(not_equals(&quot;f&quot;), default_block))
871 par_attn = par_depth // par_ratio
872 depth_cut = par_depth * 2 // 3 # 2 / 3 attention layer cutoff suggested by PAR paper
</pre>
</div>
</div>
</div>
<div id="issue-166">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>874<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
870 default_block = tuple(filter(not_equals(&quot;f&quot;), default_block))
871 par_attn = par_depth // par_ratio
872 depth_cut = par_depth * 2 // 3 # 2 / 3 attention layer cutoff suggested by PAR paper
873 par_width = (depth_cut + depth_cut // par_attn) // par_attn
874 assert len(default_block) &lt;= par_width, &quot;default block is too large for par_ratio&quot;
875 par_block = default_block + (&quot;f&quot;,) * (par_width - len(default_block))
876 par_head = par_block * par_attn
877 layer_types = par_head + (&quot;f&quot;,) * (par_depth - len(par_head))
</pre>
</div>
</div>
</div>
<div id="issue-167">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>879<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
875 par_block = default_block + (&quot;f&quot;,) * (par_width - len(default_block))
876 par_head = par_block * par_attn
877 layer_types = par_head + (&quot;f&quot;,) * (par_depth - len(par_head))
878 elif exists(sandwich_coef):
879 assert sandwich_coef &gt; 0 and sandwich_coef &lt;= depth, &quot;sandwich coefficient should be less than the depth&quot;
880 layer_types = (&quot;a&quot;,) * sandwich_coef + default_block * (depth - sandwich_coef) + (&quot;f&quot;,) * sandwich_coef
881 else:
882 layer_types = default_block * depth
</pre>
</div>
</div>
</div>
<div id="issue-168">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>941<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
937 norm_scale_shift_inp=None,
938 past_key_values=None,
939 expected_seq_len=None,
940 ):
941 assert not (
942 self.cross_attend ^ (exists(context) or exists(full_context))
943 ), &quot;context must be passed in if cross_attend is set to True&quot;
944 assert context is None or full_context is None, &quot;only one of full_context or context can be provided&quot;
945
946 hiddens = []
</pre>
</div>
</div>
</div>
<div id="issue-169">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>944<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
940 ):
941 assert not (
942 self.cross_attend ^ (exists(context) or exists(full_context))
943 ), &quot;context must be passed in if cross_attend is set to True&quot;
944 assert context is None or full_context is None, &quot;only one of full_context or context can be provided&quot;
945
946 hiddens = []
947 intermediates = []
</pre>
</div>
</div>
</div>
<div id="issue-170">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>959<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
955
956 rotary_pos_emb = None
957 if exists(self.rotary_pos_emb):
958 if not self.training and self.causal:
959 assert (
960 expected_seq_len is not None
961 ), &quot;To decode a transformer with rotary embeddings, you must specify an `expected_seq_len`&quot;
962 elif expected_seq_len is None:
963 expected_seq_len = 0
964 seq_len = x.shape[1]
</pre>
</div>
</div>
</div>
<div id="issue-171">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>1054<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1050
1051
1052 class Encoder(AttentionLayers):
1053 def __init__(self, **kwargs):
1054 assert &quot;causal&quot; not in kwargs, &quot;cannot set causality on encoder&quot;
1055 super().__init__(causal=False, **kwargs)
1056
1057
</pre>
</div>
</div>
</div>
<div id="issue-172">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>1060<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1056
1057
1058 class Decoder(AttentionLayers):
1059 def __init__(self, **kwargs):
1060 assert &quot;causal&quot; not in kwargs, &quot;cannot set causality on decoder&quot;
1061 super().__init__(causal=True, **kwargs)
1062
1063
</pre>
</div>
</div>
</div>
<div id="issue-173">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>1072<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1068
1069 class ViTransformerWrapper(nn.Module):
1070 def __init__(self, *, image_size, patch_size, attn_layers, num_classes=None, dropout=0.0, emb_dropout=0.0):
1071 super().__init__()
1072 assert isinstance(attn_layers, Encoder), &quot;attention layers must be an Encoder&quot;
1073 assert image_size % patch_size == 0, &quot;image dimensions must be divisible by the patch size&quot;
1074 dim = attn_layers.dim
1075 num_patches = (image_size // patch_size) ** 2
</pre>
</div>
</div>
</div>
<div id="issue-174">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>1073<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1069 class ViTransformerWrapper(nn.Module):
1070 def __init__(self, *, image_size, patch_size, attn_layers, num_classes=None, dropout=0.0, emb_dropout=0.0):
1071 super().__init__()
1072 assert isinstance(attn_layers, Encoder), &quot;attention layers must be an Encoder&quot;
1073 assert image_size % patch_size == 0, &quot;image dimensions must be divisible by the patch size&quot;
1074 dim = attn_layers.dim
1075 num_patches = (image_size // patch_size) ** 2
1076 patch_dim = 3 * patch_size**2
</pre>
</div>
</div>
</div>
<div id="issue-175">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>1126<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1122 tie_embedding=False,
1123 use_pos_emb=True,
1124 ):
1125 super().__init__()
1126 assert isinstance(attn_layers, AttentionLayers), &quot;attention layers must be one of Encoder or Decoder&quot;
1127
1128 dim = attn_layers.dim
1129 emb_dim = default(emb_dim, dim)
</pre>
</div>
</div>
</div>
<div id="issue-176">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/tortoise/xtransformers.py</a><br>
<b>Line number: </b>1218<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1214 def __init__(
1215 self, *, max_seq_len, attn_layers, dim_in=None, dim_out=None, emb_dim=None, emb_dropout=0.0, use_pos_emb=True
1216 ):
1217 super().__init__()
1218 assert isinstance(attn_layers, AttentionLayers), &quot;attention layers must be one of Encoder or Decoder&quot;
1219
1220 dim = attn_layers.dim
1221
</pre>
</div>
</div>
</div>
<div id="issue-177">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/networks.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/networks.py</a><br>
<b>Line number: </b>86<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
82 Shapes:
83 - x: :math:`[B, T]`
84 - x_length: :math:`[B]`
85 &quot;&quot;&quot;
86 assert x.shape[0] == x_lengths.shape[0]
87 x = self.emb(x) * math.sqrt(self.hidden_channels) # [b, t, h]
88
89 # concat the lang emb in embedding chars
</pre>
</div>
</div>
</div>
<div id="issue-178">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/networks.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/networks.py</a><br>
<b>Line number: </b>115<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
111 dropout_p=0,
112 cond_channels=0,
113 mean_only=False,
114 ):
115 assert channels % 2 == 0, &quot;channels should be divisible by 2&quot;
116 super().__init__()
117 self.half_channels = channels // 2
118 self.mean_only = mean_only
</pre>
</div>
</div>
</div>
<div id="issue-179">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/stochastic_duration_predictor.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/stochastic_duration_predictor.py</a><br>
<b>Line number: </b>243<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
239 x = self.proj(x) * x_mask
240
241 if not reverse:
242 flows = self.flows
243 assert dr is not None
244
245 # condition encoder duration
246 h = self.post_pre(dr)
</pre>
</div>
</div>
</div>
<div id="issue-180">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/vits/transforms.py</a><br>
<b>Line number: </b>168<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
164 )
165 c = -input_delta * (inputs - input_cumheights)
166
167 discriminant = b.pow(2) - 4 * a * c
168 assert (discriminant &gt;= 0).all()
169
170 root = (2 * c) / (-b - torch.sqrt(discriminant))
171 outputs = root * input_bin_widths + input_cumwidths
</pre>
</div>
</div>
</div>
<div id="issue-181">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/dvae.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/dvae.py</a><br>
<b>Line number: </b>189<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
185
186 class UpsampledConv(nn.Module):
187 def __init__(self, conv, *args, **kwargs):
188 super().__init__()
189 assert &quot;stride&quot; in kwargs.keys()
190 self.stride = kwargs[&quot;stride&quot;]
191 del kwargs[&quot;stride&quot;]
192 self.conv = conv(*args, **kwargs)
</pre>
</div>
</div>
</div>
<div id="issue-182">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/dvae.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/dvae.py</a><br>
<b>Line number: </b>234<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
230 self.discrete_loss = DiscretizationLoss(
231 num_tokens, 2, 1 / (num_tokens * 2), discretization_loss_averaging_steps
232 )
233
234 assert positional_dims &gt; 0 and positional_dims &lt; 3 # This VAE only supports 1d and 2d inputs for now.
235 if positional_dims == 2:
236 conv = nn.Conv2d
237 conv_transpose = nn.ConvTranspose2d
</pre>
</div>
</div>
</div>
<div id="issue-183">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/dvae.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/dvae.py</a><br>
<b>Line number: </b>249<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
245 act = nn.ReLU
246 elif activation == &quot;silu&quot;:
247 act = nn.SiLU
248 else:
249 assert NotImplementedError()
250
251 enc_layers = []
252 dec_layers = []
</pre>
</div>
</div>
</div>
<div id="issue-184">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py</a><br>
<b>Line number: </b>34<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
30
31 def forward(self, x):
32 sl = x.shape[1]
33 if self.relative:
34 start = random.randint(sl, self.seq_len) - sl
35 return self.emb(torch.arange(start, start + sl, device=x.device))
36 else:
37 return self.emb(torch.arange(0, sl, device=x.device))
</pre>
</div>
</div>
</div>
<div id="issue-185">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py</a><br>
<b>Line number: </b>345<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
341 for i in range(prompt_codes.shape[0]):
342 if lengths[i] &lt; prompt_len:
343 start = 0
344 else:
345 start = random.randint(0, lengths[i] - prompt_len)
346 prompt = prompt_codes[:, start : start + prompt_len]
347
348 # add start and stop tokens
</pre>
</div>
</div>
</div>
<div id="issue-186">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py</a><br>
<b>Line number: </b>399<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
395 If return_latent is specified, loss &amp; logits are not computed or returned. Only the predicted latents are returned.
396 &quot;&quot;&quot;
397 # ❗ FIXIT
398 if self.max_conditioning_inputs == 0:
399 assert cond_mels is None, &quot; ❗ cond_mels is not None, but max_conditioning_inputs == 0&quot;
400
401 max_text_len = text_lengths.max()
402 code_lengths = torch.ceil(wav_lengths / self.code_stride_len).long() + 3
</pre>
</div>
</div>
</div>
<div id="issue-187">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py</a><br>
<b>Line number: </b>430<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
426 if max_mel_len &gt; audio_codes.shape[-1]:
427 audio_codes = F.pad(audio_codes, (0, max_mel_len - audio_codes.shape[-1]))
428
429 # 💖 Lovely assertions
430 assert (
431 max_mel_len &lt;= audio_codes.shape[-1]
432 ), f&quot; ❗ max_mel_len ({max_mel_len}) &gt; audio_codes.shape[-1] ({audio_codes.shape[-1]})&quot;
433 assert (
434 max_text_len &lt;= text_inputs.shape[-1]
435 ), f&quot; ❗ max_text_len ({max_text_len}) &gt; text_inputs.shape[-1] ({text_inputs.shape[-1]})&quot;
</pre>
</div>
</div>
</div>
<div id="issue-188">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py</a><br>
<b>Line number: </b>433<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
429 # 💖 Lovely assertions
430 assert (
431 max_mel_len &lt;= audio_codes.shape[-1]
432 ), f&quot; ❗ max_mel_len ({max_mel_len}) &gt; audio_codes.shape[-1] ({audio_codes.shape[-1]})&quot;
433 assert (
434 max_text_len &lt;= text_inputs.shape[-1]
435 ), f&quot; ❗ max_text_len ({max_text_len}) &gt; text_inputs.shape[-1] ({text_inputs.shape[-1]})&quot;
436
437 # Append stop token to text inputs
438 text_inputs = F.pad(text_inputs[:, :max_text_len], (0, 1), value=self.stop_text_token)
</pre>
</div>
</div>
</div>
<div id="issue-189">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt.py</a><br>
<b>Line number: </b>537<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
533 for idx, l in enumerate(code_lengths):
534 mel_targets[idx, l + 1 :] = -1
535
536 # check if stoptoken is in every row of mel_targets
537 assert (mel_targets == self.stop_audio_token).sum() &gt;= mel_targets.shape[
538 0
539 ], f&quot; ❗ mel_targets does not contain stop token ({self.stop_audio_token}) in every row.&quot;
540
541 # ignore the loss for the segment used for conditioning
542 # coin flip for the segment to be ignored
</pre>
</div>
</div>
</div>
<div id="issue-190">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt_inference.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt_inference.py</a><br>
<b>Line number: </b>72<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
68 output_attentions=None,
69 output_hidden_states=None,
70 return_dict=None,
71 ):
72 assert self.cached_prefix_emb is not None
73 assert inputs_embeds is None # Not supported by this inference model.
74 assert labels is None # Training not supported by this inference model.
75 return_dict = return_dict if return_dict is not None else self.config.use_return_dict
</pre>
</div>
</div>
</div>
<div id="issue-191">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt_inference.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt_inference.py</a><br>
<b>Line number: </b>73<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
69 output_hidden_states=None,
70 return_dict=None,
71 ):
72 assert self.cached_prefix_emb is not None
73 assert inputs_embeds is None # Not supported by this inference model.
74 assert labels is None # Training not supported by this inference model.
75 return_dict = return_dict if return_dict is not None else self.config.use_return_dict
76
</pre>
</div>
</div>
</div>
<div id="issue-192">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt_inference.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/gpt_inference.py</a><br>
<b>Line number: </b>74<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
70 return_dict=None,
71 ):
72 assert self.cached_prefix_emb is not None
73 assert inputs_embeds is None # Not supported by this inference model.
74 assert labels is None # Training not supported by this inference model.
75 return_dict = return_dict if return_dict is not None else self.config.use_return_dict
76
77 # assert len(past_key_values) + len(input_ids) == attention_mask.shape[1]
</pre>
</div>
</div>
</div>
<div id="issue-193">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py</a><br>
<b>Line number: </b>334<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
330 state = torch.load(checkpoint_path, map_location=torch.device(&quot;cpu&quot;))
331 self.load_state_dict(state[&quot;model&quot;])
332 if eval:
333 self.eval()
334 assert not self.training
335 self.remove_weight_norm()
336
337
</pre>
</div>
</div>
</div>
<div id="issue-194">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py</a><br>
<b>Line number: </b>415<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
411 self.coefficient = coefficient
412 self.register_buffer(&quot;filter&quot;, torch.FloatTensor([-self.coefficient, 1.0]).unsqueeze(0).unsqueeze(0))
413
414 def forward(self, x):
415 assert len(x.size()) == 2
416
417 x = torch.nn.functional.pad(x.unsqueeze(1), (1, 0), &quot;reflect&quot;)
418 return torch.nn.functional.conv1d(x, self.filter).squeeze(1)
</pre>
</div>
</div>
</div>
<div id="issue-195">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py</a><br>
<b>Line number: </b>608<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
604 criterion = criterion.cuda()
605
606 if eval:
607 self.eval()
608 assert not self.training
609
610 if not eval:
611 return criterion, state[&quot;step&quot;]
</pre>
</div>
</div>
</div>
<div id="issue-196">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/hifigan_decoder.py</a><br>
<b>Line number: </b>731<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
727
728 self.load_state_dict(state)
729 if eval:
730 self.eval()
731 assert not self.training
732 self.waveform_decoder.remove_weight_norm()
</pre>
</div>
</div>
</div>
<div id="issue-197">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/latent_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/latent_encoder.py</a><br>
<b>Line number: </b>33<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
29 elif channels &lt;= 64:
30 groups = 16
31 while channels % groups != 0:
32 groups = int(groups / 2)
33 assert groups &gt; 2
34 return GroupNorm32(groups, channels)
35
36
</pre>
</div>
</div>
</div>
<div id="issue-198">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/latent_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/latent_encoder.py</a><br>
<b>Line number: </b>56<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
52 :param qkv: an [N x (H * 3 * C) x T] tensor of Qs, Ks, and Vs.
53 :return: an [N x (H * C) x T] tensor after attention.
54 &quot;&quot;&quot;
55 bs, width, length = qkv.shape
56 assert width % (3 * self.n_heads) == 0
57 ch = width // (3 * self.n_heads)
58 q, k, v = qkv.reshape(bs * self.n_heads, ch * 3, length).split(ch, dim=1)
59 scale = 1 / math.sqrt(math.sqrt(ch))
</pre>
</div>
</div>
</div>
<div id="issue-199">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/latent_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/latent_encoder.py</a><br>
<b>Line number: </b>89<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
85 self.do_activation = do_activation
86 if num_head_channels == -1:
87 self.num_heads = num_heads
88 else:
89 assert (
90 channels % num_head_channels == 0
91 ), f&quot;q,k,v channels {channels} is not divisible by num_head_channels {num_head_channels}&quot;
92 self.num_heads = channels // num_head_channels
93 self.norm = normalization(channels)
94 self.qkv = conv_nd(1, channels, out_channels * 3, 1)
</pre>
</div>
</div>
</div>
<div id="issue-200">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/perceiver_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/perceiver_encoder.py</a><br>
<b>Line number: </b>47<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
43 self.causal = causal
44 self.register_buffer(&quot;mask&quot;, None, persistent=False)
45
46 self.use_flash = use_flash
47 assert not (
48 use_flash and version.parse(torch.__version__) &lt; version.parse(&quot;2.0.0&quot;)
49 ), &quot;in order to use flash attention, you must be using pytorch 2.0 or above&quot;
50
51 # determine efficient attention configs for cuda and cpu
52 self.config = namedtuple(&quot;EfficientAttentionConfig&quot;, [&quot;enable_flash&quot;, &quot;enable_math&quot;, &quot;enable_mem_efficient&quot;])
</pre>
</div>
</div>
</div>
<div id="issue-201">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/perceiver_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/perceiver_encoder.py</a><br>
<b>Line number: </b>184<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
180
181 if not self.cond:
182 return out
183
184 assert exists(cond)
185 gamma, beta = self.to_gamma_beta(cond).chunk(2, dim=-1)
186 gamma, beta = map(lambda t: rearrange(t, &quot;b d -&gt; b 1 d&quot;), (gamma, beta))
187 return out * gamma + beta
</pre>
</div>
</div>
</div>
<div id="issue-202">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/perceiver_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/perceiver_encoder.py</a><br>
<b>Line number: </b>197<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
193 (kernel_size,) = self.kernel_size
194 (dilation,) = self.dilation
195 (stride,) = self.stride
196
197 assert stride == 1
198 self.causal_padding = dilation * (kernel_size - 1)
199
200 def forward(self, x):
</pre>
</div>
</div>
</div>
<div id="issue-203">
<div class="issue-block issue-sev-low">
<b>try_except_pass: </b> Try, Except, Pass detected.<br>
<b>Test ID:</b> B110<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py</a><br>
<b>Line number: </b>534<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html</a><br>
<div class="code">
<pre>
530 try:
531 text = re.sub(_currency_re[&quot;GBP&quot;], lambda m: _expand_currency(m, lang, &quot;GBP&quot;), text)
532 text = re.sub(_currency_re[&quot;USD&quot;], lambda m: _expand_currency(m, lang, &quot;USD&quot;), text)
533 text = re.sub(_currency_re[&quot;EUR&quot;], lambda m: _expand_currency(m, lang, &quot;EUR&quot;), text)
534 except:
535 pass
536 if lang != &quot;tr&quot;:
537 text = re.sub(_decimal_number_re, lambda m: _expand_decimal_point(m, lang), text)
538 text = re.sub(_ordinal_re[lang], lambda m: _expand_ordinal(m, lang), text)
</pre>
</div>
</div>
</div>
<div id="issue-204">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py</a><br>
<b>Line number: </b>767<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
763 (&quot;이것은 1 번째 테스트입니다&quot;, &quot;이것은 첫 번째 테스트입니다&quot;, &quot;ko&quot;),
764 ]
765 for a, b, lang in test_cases:
766 out = expand_numbers_multilingual(a, lang=lang)
767 assert out == b, f&quot;&#x27;{out}&#x27; vs &#x27;{b}&#x27;&quot;
768
769
770 def test_abbreviations_multilingual():
</pre>
</div>
</div>
</div>
<div id="issue-205">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py</a><br>
<b>Line number: </b>810<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
806 ]
807
808 for a, b, lang in test_cases:
809 out = expand_abbreviations_multilingual(a, lang=lang)
810 assert out == b, f&quot;&#x27;{out}&#x27; vs &#x27;{b}&#x27;&quot;
811
812
813 def test_symbols_multilingual():
</pre>
</div>
</div>
</div>
<div id="issue-206">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/tokenizer.py</a><br>
<b>Line number: </b>837<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
833 ]
834
835 for a, b, lang in test_cases:
836 out = expand_symbols_multilingual(a, lang=lang)
837 assert out == b, f&quot;&#x27;{out}&#x27; vs &#x27;{b}&#x27;&quot;
838
839
840 if __name__ == &quot;__main__&quot;:
</pre>
</div>
</div>
</div>
<div id="issue-207">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
15 &quot;&quot;&quot;Returns a dictionary of samples keyed by language.&quot;&quot;&quot;
16 samples_by_col = {}
17 for sample in samples:
18 col_val = sample[col]
19 assert isinstance(col_val, str)
20 if col_val not in samples_by_col:
21 samples_by_col[col_val] = []
22 samples_by_col[col_val].append(sample)
</pre>
</div>
</div>
</div>
<div id="issue-208">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>32<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
28 # if eval uses a middle size sample when it is possible to be more reproducible
29 if is_eval:
30 sample_length = int((min_sample_length + max_sample_length) / 2)
31 else:
32 sample_length = random.randint(min_sample_length, max_sample_length)
33 gap = rel_clip.shape[-1] - sample_length
34 if gap &lt; 0:
35 sample_length = rel_clip.shape[-1] // 2
</pre>
</div>
</div>
</div>
<div id="issue-209">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>42<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
38 # if eval start always from the position 0 to be more reproducible
39 if is_eval:
40 rand_start = 0
41 else:
42 rand_start = random.randint(0, gap)
43
44 rand_end = rand_start + sample_length
45 rel_clip = rel_clip[:, rand_start:rand_end]
</pre>
</div>
</div>
</div>
<div id="issue-210">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>65<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
61 self.sample_rate = sample_rate
62 self.max_wav_len = model_args.max_wav_length
63 self.max_text_len = model_args.max_text_length
64 self.use_masking_gt_prompt_approach = model_args.gpt_use_masking_gt_prompt_approach
65 assert self.max_wav_len is not None and self.max_text_len is not None
66
67 self.samples = samples
68 if not is_eval:
</pre>
</div>
</div>
</div>
<div id="issue-211">
<div class="issue-block issue-sev-low">
<b>try_except_continue: </b> Try, Except, Continue detected.<br>
<b>Test ID:</b> B112<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>85<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html</a><br>
<div class="code">
<pre>
81 new_samples = []
82 for sample in self.samples:
83 try:
84 tseq, _, wav, _, _, _ = self.load_item(sample)
85 except:
86 continue
87 # Basically, this audio file is nonexistent or too long to be supported by the dataset.
88 if (
89 wav is None
</pre>
</div>
</div>
</div>
<div id="issue-212">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>101<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
97
98 def get_text(self, text, lang):
99 tokens = self.tokenizer.encode(text, lang)
100 tokens = torch.IntTensor(tokens)
101 assert not torch.any(tokens == 1), f&quot;UNK token found in {text} -&gt; {self.tokenizer.decode(tokens)}&quot;
102 # The stop token should always be sacred.
103 assert not torch.any(tokens == 0), f&quot;Stop token found in {text}&quot;
104 return tokens
</pre>
</div>
</div>
</div>
<div id="issue-213">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>103<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
99 tokens = self.tokenizer.encode(text, lang)
100 tokens = torch.IntTensor(tokens)
101 assert not torch.any(tokens == 1), f&quot;UNK token found in {text} -&gt; {self.tokenizer.decode(tokens)}&quot;
102 # The stop token should always be sacred.
103 assert not torch.any(tokens == 0), f&quot;Stop token found in {text}&quot;
104 return tokens
105
106 def load_item(self, sample):
</pre>
</div>
</div>
</div>
<div id="issue-214">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>144<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
140 sample = self.samples[index]
141 sample_id = str(index)
142 else:
143 # select a random language
144 lang = random.choice(list(self.samples.keys()))
145 # select random sample
146 index = random.randint(0, len(self.samples[lang]) - 1)
147 sample = self.samples[lang][index]
</pre>
</div>
</div>
</div>
<div id="issue-215">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/dataset.py</a><br>
<b>Line number: </b>146<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
142 else:
143 # select a random language
144 lang = random.choice(list(self.samples.keys()))
145 # select random sample
146 index = random.randint(0, len(self.samples[lang]) - 1)
147 sample = self.samples[lang][index]
148 # a unique id for each sampel to deal with fails
149 sample_id = lang + &quot;_&quot; + str(index)
</pre>
</div>
</div>
</div>
<div id="issue-216">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/gpt_trainer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/gpt_trainer.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
56
57 def callback_clearml_load_save(operation_type, model_info):
58 # return None means skip the file upload/log, returning model_info will continue with the log/upload
59 # you can also change the upload destination file name model_info.upload_filename or check the local file size with Path(model_info.local_model_path).stat().st_size
60 assert operation_type in (&quot;load&quot;, &quot;save&quot;)
61 # print(operation_type, model_info.__dict__)
62
63 if &quot;similarities.pth&quot; in model_info.__dict__[&quot;local_model_path&quot;]:
</pre>
</div>
</div>
</div>
<div id="issue-217">
<div class="issue-block issue-sev-medium">
<b>hardcoded_tmp_directory: </b> Probable insecure usage of temp file/directory.<br>
<b>Test ID:</b> B108<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>MEDIUM<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/377.html" target="_blank">CWE-377</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/gpt_trainer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/gpt_trainer.py</a><br>
<b>Line number: </b>479<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b108_hardcoded_tmp_directory.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b108_hardcoded_tmp_directory.html</a><br>
<div class="code">
<pre>
475 config,
476 checkpoint_path,
477 eval=False,
478 strict=True,
479 cache_storage=&quot;/tmp/tts_cache&quot;,
480 target_protocol=&quot;s3&quot;,
481 target_options={&quot;anon&quot;: True},
482 ): # pylint: disable=unused-argument, disable=W0201, disable=W0102, redefined-builtin
483 &quot;&quot;&quot;Load the model checkpoint and setup for training or inference&quot;&quot;&quot;
484
485 state = self.xtts.get_compatible_checkpoint_state_dict(checkpoint_path)
486
487 # load the model weights
488 self.xtts.load_state_dict(state, strict=strict)
489
</pre>
</div>
</div>
</div>
<div id="issue-218">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/gpt_trainer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/trainer/gpt_trainer.py</a><br>
<b>Line number: </b>493<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
489
490 if eval:
491 self.xtts.gpt.init_gpt_for_inference(kv_cache=self.args.kv_cache, use_deepspeed=False)
492 self.eval()
493 assert not self.training
494
495 @staticmethod
496 def init_from_config(config: &quot;GPTTrainerConfig&quot;, samples: Union[List[List], List[Dict]] = None):
</pre>
</div>
</div>
</div>
<div id="issue-219">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/zh_num2words.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/layers/xtts/zh_num2words.py</a><br>
<b>Line number: </b>1172<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1168 ndone = 0
1169 with open(args.ifile, &quot;r&quot;, encoding=&quot;utf8&quot;) as istream, open(args.ofile, &quot;w+&quot;, encoding=&quot;utf8&quot;) as ostream:
1170 if args.format == &quot;tsv&quot;:
1171 reader = csv.DictReader(istream, delimiter=&quot;\t&quot;)
1172 assert &quot;TEXT&quot; in reader.fieldnames
1173 print(&quot;\t&quot;.join(reader.fieldnames), file=ostream)
1174
1175 for item in reader:
</pre>
</div>
</div>
</div>
<div id="issue-220">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/align_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/align_tts.py</a><br>
<b>Line number: </b>406<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
402 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;), cache=cache)
403 self.load_state_dict(state[&quot;model&quot;])
404 if eval:
405 self.eval()
406 assert not self.training
407
408 def get_criterion(self):
409 from TTS.tts.layers.losses import AlignTTSLoss # pylint: disable=import-outside-toplevel
</pre>
</div>
</div>
</div>
<div id="issue-221">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/base_tacotron.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/base_tacotron.py</a><br>
<b>Line number: </b>120<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
116 self.decoder.set_r(config.r)
117 if eval:
118 self.eval()
119 print(f&quot; &gt; Model&#x27;s reduction rate `r` is set to: {self.decoder.r}&quot;)
120 assert not self.training
121
122 def get_criterion(self) -&gt; nn.Module:
123 &quot;&quot;&quot;Get the model criterion used in training.&quot;&quot;&quot;
</pre>
</div>
</div>
</div>
<div id="issue-222">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/base_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/base_tts.py</a><br>
<b>Line number: </b>209<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
205 # by cutting off from the largest duration indeces.
206 extra_frames = dur.sum() - mel_lengths[idx]
207 largest_idxs = torch.argsort(-dur)[:extra_frames]
208 dur[largest_idxs] -= 1
209 assert (
210 dur.sum() == mel_lengths[idx]
211 ), f&quot; [!] total duration {dur.sum()} vs spectrogram length {mel_lengths[idx]}&quot;
212 durations[idx, : text_lengths[idx]] = dur
213
214 # set stop targets wrt reduction factor
</pre>
</div>
</div>
</div>
<div id="issue-223">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/delightful_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/delightful_tts.py</a><br>
<b>Line number: </b>99<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
95 return torch.ceil(lens / stride).int()
96
97
98 def initialize_embeddings(shape: Tuple[int]) -&gt; torch.Tensor:
99 assert len(shape) == 2, &quot;Can only initialize 2-D embedding matrices ...&quot;
100 return torch.randn(shape) * np.sqrt(2 / shape[1])
101
102
</pre>
</div>
</div>
</div>
<div id="issue-224">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/delightful_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/delightful_tts.py</a><br>
<b>Line number: </b>139<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
135 &quot;&quot;&quot;
136 x, sr = torchaudio.load(
137 file_path,
138 )
139 assert (x &gt; 1).sum() + (x &lt; -1).sum() == 0
140 return x, sr
141
142
</pre>
</div>
</div>
</div>
<div id="issue-225">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/delightful_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/delightful_tts.py</a><br>
<b>Line number: </b>1550<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1546 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;))
1547 self.load_state_dict(state[&quot;model&quot;])
1548 if eval:
1549 self.eval()
1550 assert not self.training
1551
1552 def get_state_dict(self):
1553 &quot;&quot;&quot;Custom state dict of the model with all the necessary components for inference.&quot;&quot;&quot;
</pre>
</div>
</div>
</div>
<div id="issue-226">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/forward_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/forward_tts.py</a><br>
<b>Line number: </b>837<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
833 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;), cache=cache)
834 self.load_state_dict(state[&quot;model&quot;])
835 if eval:
836 self.eval()
837 assert not self.training
838
839 def get_criterion(self):
840 from TTS.tts.layers.losses import ForwardTTSLoss # pylint: disable=import-outside-toplevel
</pre>
</div>
</div>
</div>
<div id="issue-227">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/glow_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/glow_tts.py</a><br>
<b>Line number: </b>125<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
121 self.embedded_speaker_dim = (
122 config.d_vector_dim if &quot;d_vector_dim&quot; in config and config.d_vector_dim is not None else 512
123 )
124 if self.speaker_manager is not None:
125 assert (
126 config.d_vector_dim == self.speaker_manager.embedding_dim
127 ), &quot; [!] d-vector dimension mismatch b/w config and speaker manager.&quot;
128 # init speaker embedding layer
129 if config.use_speaker_embedding and not config.use_d_vector_file:
130 print(&quot; &gt; Init speaker_embedding layer.&quot;)
</pre>
</div>
</div>
</div>
<div id="issue-228">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/glow_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/glow_tts.py</a><br>
<b>Line number: </b>530<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
526 self.load_state_dict(state[&quot;model&quot;])
527 if eval:
528 self.eval()
529 self.store_inverse()
530 assert not self.training
531
532 @staticmethod
533 def get_criterion():
</pre>
</div>
</div>
</div>
<div id="issue-229">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/neuralhmm_tts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/neuralhmm_tts.py</a><br>
<b>Line number: </b>261<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
257 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;))
258 self.load_state_dict(state[&quot;model&quot;])
259 if eval:
260 self.eval()
261 assert not self.training
262
263 def on_init_start(self, trainer):
264 &quot;&quot;&quot;If the current dataset does not have normalisation statistics and initialisation transition_probability it computes them otherwise loads.&quot;&quot;&quot;
</pre>
</div>
</div>
</div>
<div id="issue-230">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/overflow.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/overflow.py</a><br>
<b>Line number: </b>277<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
273 self.load_state_dict(state[&quot;model&quot;])
274 if eval:
275 self.eval()
276 self.decoder.store_inverse()
277 assert not self.training
278
279 def on_init_start(self, trainer):
280 &quot;&quot;&quot;If the current dataset does not have normalisation statistics and initialisation transition_probability it computes them otherwise loads.&quot;&quot;&quot;
</pre>
</div>
</div>
</div>
<div id="issue-231">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/tortoise.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/tortoise.py</a><br>
<b>Line number: </b>83<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
79 gap = clip.shape[-1] - cond_length
80 if gap &lt; 0:
81 clip = F.pad(clip, pad=(0, abs(gap)))
82 elif gap &gt; 0:
83 rand_start = random.randint(0, gap)
84 clip = clip[:, rand_start : rand_start + cond_length]
85 mel_clip = TorchMelSpectrogram(**kwargs)(clip.unsqueeze(0)).squeeze(0)
86 return mel_clip.unsqueeze(0).to(device)
</pre>
</div>
</div>
</div>
<div id="issue-232">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/tortoise.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/tortoise.py</a><br>
<b>Line number: </b>422<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
418 0 - latents will be generated as in original tortoise, using ~4.27s from each voice sample, averaging latent across all samples
419 1 - latents will be generated using (almost) entire voice samples, averaged across all the ~4.27s chunks
420 2 - latents will be generated using (almost) entire voice samples, averaged per voice sample
421 &quot;&quot;&quot;
422 assert latent_averaging_mode in [
423 0,
424 1,
425 2,
426 ], &quot;latent_averaging mode has to be one of (0, 1, 2)&quot;
427
428 with torch.no_grad():
429 voice_samples = [[v.to(self.device) for v in ls] for ls in voice_samples]
</pre>
</div>
</div>
</div>
<div id="issue-233">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/tortoise.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/tortoise.py</a><br>
<b>Line number: </b>674<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
670 deterministic_seed = deterministic_state(seed=use_deterministic_seed)
671
672 text_tokens = torch.IntTensor(self.tokenizer.encode(text)).unsqueeze(0).to(self.device)
673 text_tokens = F.pad(text_tokens, (0, 1)) # This may not be necessary.
674 assert (
675 text_tokens.shape[-1] &lt; 400
676 ), &quot;Too much text provided. Break the text up into separate segments and re-try inference.&quot;
677
678 if voice_samples is not None:
679 (
</pre>
</div>
</div>
</div>
<div id="issue-234">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>74<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
70 Return Shapes:
71 - x: :math:`[1, T]`
72 &quot;&quot;&quot;
73 x, sr = torchaudio.load(file_path)
74 assert (x &gt; 1).sum() + (x &lt; -1).sum() == 0
75 return x, sr
76
77
</pre>
</div>
</div>
</div>
<div id="issue-235">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>245<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
241 dataset_samples_weight = dataset_samples_weight / np.linalg.norm(dataset_samples_weight)
242 if multi_dict is not None:
243 # check if all keys are in the multi_dict
244 for k in multi_dict:
245 assert k in unique_attr_names, f&quot;{k} not in {unique_attr_names}&quot;
246 # scale weights
247 multiplier_samples = np.array([multi_dict.get(item[attr_name], 1.0) for item in items])
248 dataset_samples_weight *= multiplier_samples
</pre>
</div>
</div>
</div>
<div id="issue-236">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1142<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1138 x, x_mask, g=g if self.args.condition_dp_on_speaker else None, lang_emb=lang_emb
1139 )
1140 w = torch.exp(logw) * x_mask * self.length_scale
1141 else:
1142 assert durations.shape[-1] == x.shape[-1]
1143 w = durations.unsqueeze(0)
1144
1145 w_ceil = torch.ceil(w)
</pre>
</div>
</div>
</div>
<div id="issue-237">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1213<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1209 y_lengths (Tensor): Length of each reference spectrogram. Tensor of shape [B]
1210 speaker_cond_src (Tensor): Reference speaker ID. Tensor of shape [B,]
1211 speaker_cond_tgt (Tensor): Target speaker ID. Tensor of shape [B,]
1212 &quot;&quot;&quot;
1213 assert self.num_speakers &gt; 0, &quot;num_speakers have to be larger than 0.&quot;
1214 # speaker embedding
1215 if self.args.use_speaker_embedding and not self.args.use_d_vector_file:
1216 g_src = self.emb_g(torch.from_numpy((np.array(speaker_cond_src))).unsqueeze(0)).unsqueeze(-1)
</pre>
</div>
</div>
</div>
<div id="issue-238">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1528<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1524 fmax=ac.mel_fmax,
1525 )
1526
1527 if self.args.encoder_sample_rate:
1528 assert batch[&quot;spec&quot;].shape[2] == int(
1529 batch[&quot;mel&quot;].shape[2] / self.interpolate_factor
1530 ), f&quot;{batch[&#x27;spec&#x27;].shape[2]}, {batch[&#x27;mel&#x27;].shape[2]}&quot;
1531 else:
1532 assert batch[&quot;spec&quot;].shape[2] == batch[&quot;mel&quot;].shape[2], f&quot;{batch[&#x27;spec&#x27;].shape[2]}, {batch[&#x27;mel&#x27;].shape[2]}&quot;
1533
</pre>
</div>
</div>
</div>
<div id="issue-239">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1532<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1528 assert batch[&quot;spec&quot;].shape[2] == int(
1529 batch[&quot;mel&quot;].shape[2] / self.interpolate_factor
1530 ), f&quot;{batch[&#x27;spec&#x27;].shape[2]}, {batch[&#x27;mel&#x27;].shape[2]}&quot;
1531 else:
1532 assert batch[&quot;spec&quot;].shape[2] == batch[&quot;mel&quot;].shape[2], f&quot;{batch[&#x27;spec&#x27;].shape[2]}, {batch[&#x27;mel&#x27;].shape[2]}&quot;
1533
1534 # compute spectrogram frame lengths
1535 batch[&quot;spec_lens&quot;] = (batch[&quot;spec&quot;].shape[2] * batch[&quot;waveform_rel_lens&quot;]).int()
</pre>
</div>
</div>
</div>
<div id="issue-240">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1539<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1535 batch[&quot;spec_lens&quot;] = (batch[&quot;spec&quot;].shape[2] * batch[&quot;waveform_rel_lens&quot;]).int()
1536 batch[&quot;mel_lens&quot;] = (batch[&quot;mel&quot;].shape[2] * batch[&quot;waveform_rel_lens&quot;]).int()
1537
1538 if self.args.encoder_sample_rate:
1539 assert (batch[&quot;spec_lens&quot;] - (batch[&quot;mel_lens&quot;] / self.interpolate_factor).int()).sum() == 0
1540 else:
1541 assert (batch[&quot;spec_lens&quot;] - batch[&quot;mel_lens&quot;]).sum() == 0
1542
</pre>
</div>
</div>
</div>
<div id="issue-241">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1541<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1537
1538 if self.args.encoder_sample_rate:
1539 assert (batch[&quot;spec_lens&quot;] - (batch[&quot;mel_lens&quot;] / self.interpolate_factor).int()).sum() == 0
1540 else:
1541 assert (batch[&quot;spec_lens&quot;] - batch[&quot;mel_lens&quot;]).sum() == 0
1542
1543 # zero the padding frames
1544 batch[&quot;spec&quot;] = batch[&quot;spec&quot;] * sequence_mask(batch[&quot;spec_lens&quot;]).unsqueeze(1)
</pre>
</div>
</div>
</div>
<div id="issue-242">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1725<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1721 self.load_state_dict(state[&quot;model&quot;], strict=strict)
1722
1723 if eval:
1724 self.eval()
1725 assert not self.training
1726
1727 def load_fairseq_checkpoint(
1728 self, config, checkpoint_dir, eval=False, strict=True
</pre>
</div>
</div>
</div>
<div id="issue-243">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1769<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1765 new_chk = rehash_fairseq_vits_checkpoint(checkpoint_file)
1766 self.load_state_dict(new_chk, strict=strict)
1767 if eval:
1768 self.eval()
1769 assert not self.training
1770
1771 @staticmethod
1772 def init_from_config(config: &quot;VitsConfig&quot;, samples: Union[List[List], List[Dict]] = None, verbose=True):
</pre>
</div>
</div>
</div>
<div id="issue-244">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1785<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1781
1782 upsample_rate = torch.prod(torch.as_tensor(config.model_args.upsample_rates_decoder)).item()
1783
1784 if not config.model_args.encoder_sample_rate:
1785 assert (
1786 upsample_rate == config.audio.hop_length
1787 ), f&quot; [!] Product of upsample rates must be equal to the hop length - {upsample_rate} vs {config.audio.hop_length}&quot;
1788 else:
1789 encoder_to_vocoder_upsampling_factor = config.audio.sample_rate / config.model_args.encoder_sample_rate
1790 effective_hop_length = config.audio.hop_length * encoder_to_vocoder_upsampling_factor
</pre>
</div>
</div>
</div>
<div id="issue-245">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/vits.py</a><br>
<b>Line number: </b>1791<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1787 ), f&quot; [!] Product of upsample rates must be equal to the hop length - {upsample_rate} vs {config.audio.hop_length}&quot;
1788 else:
1789 encoder_to_vocoder_upsampling_factor = config.audio.sample_rate / config.model_args.encoder_sample_rate
1790 effective_hop_length = config.audio.hop_length * encoder_to_vocoder_upsampling_factor
1791 assert (
1792 upsample_rate == effective_hop_length
1793 ), f&quot; [!] Product of upsample rates must be equal to the hop length - {upsample_rate} vs {effective_hop_length}&quot;
1794
1795 ap = AudioProcessor.init_from_config(config, verbose=verbose)
1796 tokenizer, new_config = TTSTokenizer.init_from_config(config)
</pre>
</div>
</div>
</div>
<div id="issue-246">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/xtts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/xtts.py</a><br>
<b>Line number: </b>398<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
394 `text_input` as text token IDs after tokenizer, `voice_samples` as samples used for cloning, `conditioning_latents`
395 as latents used at inference.
396
397 &quot;&quot;&quot;
398 assert (
399 &quot;zh-cn&quot; if language == &quot;zh&quot; else language in self.config.languages
400 ), f&quot; ❗ Language {language} is not supported. Supported languages are {self.config.languages}&quot;
401 # Use generally found best tuning knobs for generation.
402 settings = {
403 &quot;temperature&quot;: config.temperature,
</pre>
</div>
</div>
</div>
<div id="issue-247">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/xtts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/xtts.py</a><br>
<b>Line number: </b>536<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
532 for sent in text:
533 sent = sent.strip().lower()
534 text_tokens = torch.IntTensor(self.tokenizer.encode(sent, lang=language)).unsqueeze(0).to(self.device)
535
536 assert (
537 text_tokens.shape[-1] &lt; self.args.gpt_max_text_tokens
538 ), &quot; ❗ XTTS can only generate text with a maximum of 400 tokens.&quot;
539
540 with torch.no_grad():
541 gpt_codes = self.gpt.generate(
</pre>
</div>
</div>
</div>
<div id="issue-248">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/xtts.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/models/xtts.py</a><br>
<b>Line number: </b>644<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
640 for sent in text:
641 sent = sent.strip().lower()
642 text_tokens = torch.IntTensor(self.tokenizer.encode(sent, lang=language)).unsqueeze(0).to(self.device)
643
644 assert (
645 text_tokens.shape[-1] &lt; self.args.gpt_max_text_tokens
646 ), &quot; ❗ XTTS can only generate text with a maximum of 400 tokens.&quot;
647
648 fake_inputs = self.gpt.compute_embeddings(
649 gpt_cond_latent.to(self.device),
</pre>
</div>
</div>
</div>
<div id="issue-249">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/data.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/data.py</a><br>
<b>Line number: </b>9<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
5
6
7 def _pad_data(x, length):
8 _pad = 0
9 assert x.ndim == 1
10 return np.pad(x, (0, length - x.shape[0]), mode=&quot;constant&quot;, constant_values=_pad)
11
12
</pre>
</div>
</div>
</div>
<div id="issue-250">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/data.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/data.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
16
17
18 def _pad_tensor(x, length):
19 _pad = 0.0
20 assert x.ndim == 2
21 x = np.pad(x, [[0, 0], [0, length - x.shape[1]]], mode=&quot;constant&quot;, constant_values=_pad)
22 return x
23
</pre>
</div>
</div>
</div>
<div id="issue-251">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/data.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/data.py</a><br>
<b>Line number: </b>43<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
39
40 Returns:
41 np.ndarray: Padded stop target array.
42 &quot;&quot;&quot;
43 assert x.ndim == 1
44 return np.pad(x, (0, length - x.shape[0]), mode=&quot;constant&quot;, constant_values=pad_val)
45
46
</pre>
</div>
</div>
</div>
<div id="issue-252">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/helpers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/helpers.py</a><br>
<b>Line number: </b>115<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
111 if let_short_samples:
112 _x_lenghts[len_diff &lt; 0] = segment_size
113 len_diff = _x_lenghts - segment_size
114 else:
115 assert all(
116 len_diff &gt; 0
117 ), f&quot; [!] At least one sample is shorter than the segment size ({segment_size}). \n {_x_lenghts}&quot;
118 segment_indices = (torch.rand([B]).type_as(x) * (len_diff + 1)).long()
119 ret = segment(x, segment_indices, segment_size, pad_short=pad_short)
120 return ret, segment_indices
</pre>
</div>
</div>
</div>
<div id="issue-253">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py</a><br>
<b>Line number: </b>90<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
86 Returns:
87 np.ndarray: embedding.
88 &quot;&quot;&quot;
89 if self.name_to_id:
90 return self.name_to_id[random.choices(list(self.name_to_id.keys()))[0]]
91
92 return None
93
</pre>
</div>
</div>
</div>
<div id="issue-254">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py</a><br>
<b>Line number: </b>292<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
288 embeddings = self.get_embeddings_by_name(idx)
289 if num_samples is None:
290 embeddings = np.stack(embeddings).mean(0)
291 else:
292 assert len(embeddings) &gt;= num_samples, f&quot; [!] {idx} has number of samples &lt; {num_samples}&quot;
293 if randomize:
294 embeddings = np.stack(random.choices(embeddings, k=num_samples)).mean(0)
295 else:
</pre>
</div>
</div>
</div>
<div id="issue-255">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py</a><br>
<b>Line number: </b>294<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
290 embeddings = np.stack(embeddings).mean(0)
291 else:
292 assert len(embeddings) &gt;= num_samples, f&quot; [!] {idx} has number of samples &lt; {num_samples}&quot;
293 if randomize:
294 embeddings = np.stack(random.choices(embeddings, k=num_samples)).mean(0)
295 else:
296 embeddings = np.stack(embeddings[:num_samples]).mean(0)
297 return embeddings
</pre>
</div>
</div>
</div>
<div id="issue-256">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/managers.py</a><br>
<b>Line number: </b>308<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
304 Returns:
305 np.ndarray: embedding.
306 &quot;&quot;&quot;
307 if self.embeddings:
308 return self.embeddings[random.choices(list(self.embeddings.keys()))[0]][&quot;embedding&quot;]
309
310 return None
311
</pre>
</div>
</div>
</div>
<div id="issue-257">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/speakers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/speakers.py</a><br>
<b>Line number: </b>183<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
179 speaker_manager.load_embeddings_from_file(speakers_file)
180 elif not c.use_d_vector_file: # restor speaker manager with speaker ID file.
181 speaker_ids_from_data = speaker_manager.name_to_id
182 speaker_manager.load_ids_from_file(speakers_file)
183 assert all(
184 speaker in speaker_manager.name_to_id for speaker in speaker_ids_from_data
185 ), &quot; [!] You cannot introduce new speakers to a pre-trained model.&quot;
186 elif c.use_d_vector_file and c.d_vector_file:
187 # new speaker manager with external speaker embeddings.
188 speaker_manager.load_embeddings_from_file(c.d_vector_file)
</pre>
</div>
</div>
</div>
<div id="issue-258">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>47<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
43
44 x = tensors[0]
45
46 for t in tensors:
47 assert torch.is_tensor(t), f&quot;Expected torch.Tensor, got {type(t)}&quot;
48 assert t.device == x.device, f&quot;Expected tensors to be on {x.device}, got {t.device}&quot;
49
50 if size_range is None:
</pre>
</div>
</div>
</div>
<div id="issue-259">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>48<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
44 x = tensors[0]
45
46 for t in tensors:
47 assert torch.is_tensor(t), f&quot;Expected torch.Tensor, got {type(t)}&quot;
48 assert t.device == x.device, f&quot;Expected tensors to be on {x.device}, got {t.device}&quot;
49
50 if size_range is None:
51 assert t.size() == x.size(), f&quot;Expected tensors with same size, got {t.size()} and {x.size()}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-260">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>51<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
47 assert torch.is_tensor(t), f&quot;Expected torch.Tensor, got {type(t)}&quot;
48 assert t.device == x.device, f&quot;Expected tensors to be on {x.device}, got {t.device}&quot;
49
50 if size_range is None:
51 assert t.size() == x.size(), f&quot;Expected tensors with same size, got {t.size()} and {x.size()}&quot;
52 else:
53 assert (
54 t.size()[size_range[0] : size_range[1]] == x.size()[size_range[0] : size_range[1]]
</pre>
</div>
</div>
</div>
<div id="issue-261">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>53<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
49
50 if size_range is None:
51 assert t.size() == x.size(), f&quot;Expected tensors with same size, got {t.size()} and {x.size()}&quot;
52 else:
53 assert (
54 t.size()[size_range[0] : size_range[1]] == x.size()[size_range[0] : size_range[1]]
55 ), f&quot;Expected tensors with same size at given dimensions, got {t.size()} and {x.size()}&quot;
56
57 if dim_range[0] == dim_range[1]:
58 assert t.dim() == dim_range[0], f&quot;Expected number of dimensions to be {dim_range[0]}, got {t.dim()}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-262">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>58<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
54 t.size()[size_range[0] : size_range[1]] == x.size()[size_range[0] : size_range[1]]
55 ), f&quot;Expected tensors with same size at given dimensions, got {t.size()} and {x.size()}&quot;
56
57 if dim_range[0] == dim_range[1]:
58 assert t.dim() == dim_range[0], f&quot;Expected number of dimensions to be {dim_range[0]}, got {t.dim()}&quot;
59 elif dim_range[0] &lt; dim_range[1]:
60 assert (
61 dim_range[0] &lt;= t.dim() &lt;= dim_range[1]
</pre>
</div>
</div>
</div>
<div id="issue-263">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
56
57 if dim_range[0] == dim_range[1]:
58 assert t.dim() == dim_range[0], f&quot;Expected number of dimensions to be {dim_range[0]}, got {t.dim()}&quot;
59 elif dim_range[0] &lt; dim_range[1]:
60 assert (
61 dim_range[0] &lt;= t.dim() &lt;= dim_range[1]
62 ), f&quot;Expected number of dimensions to be between {dim_range[0]} and {dim_range[1]}, got {t.dim()}&quot;
63
64 if data_range[0] &lt; data_range[1]:
65 assert data_range[0] &lt;= t.min(), f&quot;Expected values to be greater or equal to {data_range[0]}, got {t.min()}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-264">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>65<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
61 dim_range[0] &lt;= t.dim() &lt;= dim_range[1]
62 ), f&quot;Expected number of dimensions to be between {dim_range[0]} and {dim_range[1]}, got {t.dim()}&quot;
63
64 if data_range[0] &lt; data_range[1]:
65 assert data_range[0] &lt;= t.min(), f&quot;Expected values to be greater or equal to {data_range[0]}, got {t.min()}&quot;
66 assert t.max() &lt;= data_range[1], f&quot;Expected values to be lower or equal to {data_range[1]}, got {t.max()}&quot;
67
68
</pre>
</div>
</div>
</div>
<div id="issue-265">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>66<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
62 ), f&quot;Expected number of dimensions to be between {dim_range[0]} and {dim_range[1]}, got {t.dim()}&quot;
63
64 if data_range[0] &lt; data_range[1]:
65 assert data_range[0] &lt;= t.min(), f&quot;Expected values to be greater or equal to {data_range[0]}, got {t.min()}&quot;
66 assert t.max() &lt;= data_range[1], f&quot;Expected values to be lower or equal to {data_range[1]}, got {t.max()}&quot;
67
68
69 def gaussian_filter(kernel_size: int, sigma: float) -&gt; torch.Tensor:
</pre>
</div>
</div>
</div>
<div id="issue-266">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>128<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
124 IEEE Transactions on Image Processing, 13, 600-612.
125 https://ece.uwaterloo.ca/~z70wang/publications/ssim.pdf,
126 DOI: `10.1109/TIP.2003.819861`
127 &quot;&quot;&quot;
128 assert kernel_size % 2 == 1, f&quot;Kernel size must be odd, got [{kernel_size}]&quot;
129 _validate_input([x, y], dim_range=(4, 5), data_range=(0, data_range))
130
131 x = x / float(data_range)
</pre>
</div>
</div>
</div>
<div id="issue-267">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/ssim.py</a><br>
<b>Line number: </b>232<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
228 self.kernel_size = kernel_size
229
230 # This check might look redundant because kernel size is checked within the ssim function anyway.
231 # However, this check allows to fail fast when the loss is being initialised and training has not been started.
232 assert kernel_size % 2 == 1, f&quot;Kernel size must be odd, got [{kernel_size}]&quot;
233 self.kernel_sigma = kernel_sigma
234 self.k1 = k1
235 self.k2 = k2
</pre>
</div>
</div>
</div>
<div id="issue-268">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/synthesis.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/synthesis.py</a><br>
<b>Line number: </b>189<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
185
186 language_name = None
187 if language_id is not None:
188 language = [k for k, v in model.language_manager.name_to_id.items() if v == language_id]
189 assert len(language) == 1, &quot;language_id must be a valid language&quot;
190 language_name = language[0]
191
192 # convert text to sequence of token IDs
</pre>
</div>
</div>
</div>
<div id="issue-269">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/characters.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/characters.py</a><br>
<b>Line number: </b>294<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
290 _vocab = [self._pad] + _vocab if self._pad is not None and len(self._pad) &gt; 0 else _vocab
291 self.vocab = _vocab + list(self._punctuations)
292 if self.is_unique:
293 duplicates = {x for x in self.vocab if self.vocab.count(x) &gt; 1}
294 assert (
295 len(self.vocab) == len(self._char_to_id) == len(self._id_to_char)
296 ), f&quot; [!] There are duplicate characters in the character set. {duplicates}&quot;
297
298 def char_to_id(self, char: str) -&gt; int:
299 try:
</pre>
</div>
</div>
</div>
<div id="issue-270">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py</a><br>
<b>Line number: </b>3<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import logging
2 import re
3 import subprocess
4 from typing import Dict, List
5
6 from packaging.version import Version
7
8 from TTS.tts.utils.text.phonemizers.base import BasePhonemizer
</pre>
</div>
</div>
</div>
<div id="issue-271">
<div class="issue-block issue-sev-low">
<b>start_process_with_a_shell: </b> Starting a process with a shell: Seems safe, but may be changed in the future, consider rewriting without shell<br>
<b>Test ID:</b> B605<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b605_start_process_with_a_shell.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b605_start_process_with_a_shell.html</a><br>
<div class="code">
<pre>
20 espeak_version_pattern = re.compile(r&quot;text-to-speech:\s(?P&lt;version&gt;\d+\.\d+(\.\d+)?)&quot;)
21
22
23 def get_espeak_version():
24 output = subprocess.getoutput(&quot;espeak --version&quot;)
25 match = espeak_version_pattern.search(output)
26
27 return match.group(&quot;version&quot;)
</pre>
</div>
</div>
</div>
<div id="issue-272">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
20 espeak_version_pattern = re.compile(r&quot;text-to-speech:\s(?P&lt;version&gt;\d+\.\d+(\.\d+)?)&quot;)
21
22
23 def get_espeak_version():
24 output = subprocess.getoutput(&quot;espeak --version&quot;)
25 match = espeak_version_pattern.search(output)
26
27 return match.group(&quot;version&quot;)
</pre>
</div>
</div>
</div>
<div id="issue-273">
<div class="issue-block issue-sev-low">
<b>start_process_with_a_shell: </b> Starting a process with a shell: Seems safe, but may be changed in the future, consider rewriting without shell<br>
<b>Test ID:</b> B605<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b605_start_process_with_a_shell.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b605_start_process_with_a_shell.html</a><br>
<div class="code">
<pre>
27 return match.group(&quot;version&quot;)
28
29
30 def get_espeakng_version():
31 output = subprocess.getoutput(&quot;espeak-ng --version&quot;)
32 return output.split()[3]
33
34
</pre>
</div>
</div>
</div>
<div id="issue-274">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
27 return match.group(&quot;version&quot;)
28
29
30 def get_espeakng_version():
31 output = subprocess.getoutput(&quot;espeak-ng --version&quot;)
32 return output.split()[3]
33
34
</pre>
</div>
</div>
</div>
<div id="issue-275">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/tts/utils/text/phonemizers/espeak_wrapper.py</a><br>
<b>Line number: </b>58<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
54 ]
55 cmd.extend(args)
56 logging.debug(&quot;espeakng: executing %s&quot;, repr(cmd))
57
58 with subprocess.Popen(
59 cmd,
60 stdout=subprocess.PIPE,
61 stderr=subprocess.STDOUT,
62 ) as p:
63 res = iter(p.stdout.readline, b&quot;&quot;)
64 if not sync:
65 p.stdout.close()
</pre>
</div>
</div>
</div>
<div id="issue-276">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>29<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
25 Returns:
26 np.ndarray: melspectrogram basis.
27 &quot;&quot;&quot;
28 if mel_fmax is not None:
29 assert mel_fmax &lt;= sample_rate // 2
30 assert mel_fmax - mel_fmin &gt; 0
31 return librosa.filters.mel(sr=sample_rate, n_fft=fft_size, n_mels=num_mels, fmin=mel_fmin, fmax=mel_fmax)
32
</pre>
</div>
</div>
</div>
<div id="issue-277">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
26 np.ndarray: melspectrogram basis.
27 &quot;&quot;&quot;
28 if mel_fmax is not None:
29 assert mel_fmax &lt;= sample_rate // 2
30 assert mel_fmax - mel_fmin &gt; 0
31 return librosa.filters.mel(sr=sample_rate, n_fft=fft_size, n_mels=num_mels, fmin=mel_fmin, fmax=mel_fmax)
32
33
</pre>
</div>
</div>
</div>
<div id="issue-278">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>43<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
39 Returns:
40 Tuple[int, int]: hop length and window length for STFT.
41 &quot;&quot;&quot;
42 factor = frame_length_ms / frame_shift_ms
43 assert (factor).is_integer(), &quot; [!] frame_shift_ms should divide frame_length_ms&quot;
44 win_length = int(frame_length_ms / 1000.0 * sample_rate)
45 hop_length = int(win_length / float(factor))
46 return win_length, hop_length
</pre>
</div>
</div>
</div>
<div id="issue-279">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>72<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
68
69 Returns:
70 np.ndarray: Decibels spectrogram.
71 &quot;&quot;&quot;
72 assert (x &lt; 0).sum() == 0, &quot; [!] Input values must be non-negative.&quot;
73 return gain * _log(np.maximum(1e-8, x), base)
74
75
</pre>
</div>
</div>
</div>
<div id="issue-280">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>132<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
128
129
130 def mel_to_spec(*, mel: np.ndarray = None, mel_basis: np.ndarray = None, **kwargs) -&gt; np.ndarray:
131 &quot;&quot;&quot;Convert a melspectrogram to full scale spectrogram.&quot;&quot;&quot;
132 assert (mel &lt; 0).sum() == 0, &quot; [!] Input values must be non-negative.&quot;
133 inv_mel_basis = np.linalg.pinv(mel_basis)
134 return np.maximum(1e-10, np.dot(inv_mel_basis, mel))
135
</pre>
</div>
</div>
</div>
<div id="issue-281">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>280<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
276 &gt;&gt;&gt; ap = AudioProcessor(**conf)
277 &gt;&gt;&gt; wav = ap.load_wav(WAV_FILE, sr=ap.sample_rate)[:5 * ap.sample_rate]
278 &gt;&gt;&gt; pitch = ap.compute_f0(wav)
279 &quot;&quot;&quot;
280 assert pitch_fmax is not None, &quot; [!] Set `pitch_fmax` before caling `compute_f0`.&quot;
281 assert pitch_fmin is not None, &quot; [!] Set `pitch_fmin` before caling `compute_f0`.&quot;
282
283 f0, voiced_mask, _ = pyin(
</pre>
</div>
</div>
</div>
<div id="issue-282">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>281<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
277 &gt;&gt;&gt; wav = ap.load_wav(WAV_FILE, sr=ap.sample_rate)[:5 * ap.sample_rate]
278 &gt;&gt;&gt; pitch = ap.compute_f0(wav)
279 &quot;&quot;&quot;
280 assert pitch_fmax is not None, &quot; [!] Set `pitch_fmax` before caling `compute_f0`.&quot;
281 assert pitch_fmin is not None, &quot; [!] Set `pitch_fmin` before caling `compute_f0`.&quot;
282
283 f0, voiced_mask, _ = pyin(
284 y=x.astype(np.double),
</pre>
</div>
</div>
</div>
<div id="issue-283">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/numpy_transforms.py</a><br>
<b>Line number: </b>403<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
399
400 Returns:
401 np.ndarray: RMS normalized waveform.
402 &quot;&quot;&quot;
403 assert -99 &lt;= db_level &lt;= 0, &quot; [!] db_level should be between -99 and 0&quot;
404 wav = rms_norm(wav=x, db_level=db_level)
405 return wav
406
</pre>
</div>
</div>
</div>
<div id="issue-284">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/processor.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/processor.py</a><br>
<b>Line number: </b>226<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
222 else:
223 # use stft parameters from config file
224 self.hop_length = hop_length
225 self.win_length = win_length
226 assert min_level_db != 0.0, &quot; [!] min_level_db is 0&quot;
227 assert (
228 self.win_length &lt;= self.fft_size
229 ), f&quot; [!] win_length cannot be larger than fft_size - {self.win_length} vs {self.fft_size}&quot;
</pre>
</div>
</div>
</div>
<div id="issue-285">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/processor.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/processor.py</a><br>
<b>Line number: </b>227<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
223 # use stft parameters from config file
224 self.hop_length = hop_length
225 self.win_length = win_length
226 assert min_level_db != 0.0, &quot; [!] min_level_db is 0&quot;
227 assert (
228 self.win_length &lt;= self.fft_size
229 ), f&quot; [!] win_length cannot be larger than fft_size - {self.win_length} vs {self.fft_size}&quot;
230 members = vars(self)
231 if verbose:
232 print(&quot; &gt; Setting up Audio Processor...&quot;)
</pre>
</div>
</div>
</div>
<div id="issue-286">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/processor.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/audio/processor.py</a><br>
<b>Line number: </b>361<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
357 for key in stats_config.keys():
358 if key in skip_parameters:
359 continue
360 if key not in [&quot;sample_rate&quot;, &quot;trim_db&quot;]:
361 assert (
362 stats_config[key] == self.__dict__[key]
363 ), f&quot; [!] Audio param {key} does not match the value used for computing mean-var stats. {stats_config[key]} vs {self.__dict__[key]}&quot;
364 return mel_mean, mel_std, linear_mean, linear_std, stats_config
365
366 # pylint: disable=attribute-defined-outside-init
</pre>
</div>
</div>
</div>
<div id="issue-287">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/distribute.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/distribute.py</a><br>
<b>Line number: </b>14<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
10 return rt
11
12
13 def init_distributed(rank, num_gpus, group_name, dist_backend, dist_url):
14 assert torch.cuda.is_available(), &quot;Distributed mode requires CUDA.&quot;
15
16 # Set cuda device so everything is done on the right GPU.
17 torch.cuda.set_device(rank % torch.cuda.device_count())
</pre>
</div>
</div>
</div>
<div id="issue-288">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.<br>
<b>Test ID:</b> B310<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen</a><br>
<div class="code">
<pre>
26 &quot;&quot;&quot;
27
28 # If we already have the whole file, there is no need to download it again
29 req = urllib.request.Request(url, method=&quot;HEAD&quot;)
30 with urllib.request.urlopen(req) as response:
31 url_size = int(response.info().get(&quot;Content-Length&quot;, -1))
32 if url_size == start_byte:
33 return
</pre>
</div>
</div>
</div>
<div id="issue-289">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.<br>
<b>Test ID:</b> B310<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py</a><br>
<b>Line number: </b>39<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen</a><br>
<div class="code">
<pre>
35 req = urllib.request.Request(url)
36 if start_byte:
37 req.headers[&quot;Range&quot;] = &quot;bytes={}-&quot;.format(start_byte)
38
39 with urllib.request.urlopen(req) as upointer, tqdm(
40 unit=&quot;B&quot;,
41 unit_scale=True,
42 unit_divisor=1024,
</pre>
</div>
</div>
</div>
<div id="issue-290">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.<br>
<b>Test ID:</b> B310<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py</a><br>
<b>Line number: </b>79<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen</a><br>
<div class="code">
<pre>
75 resume (bool, optional): Enable resuming download (Default: ``False``).
76 &quot;&quot;&quot;
77
78 req = urllib.request.Request(url, method=&quot;HEAD&quot;)
79 req_info = urllib.request.urlopen(req).info() # pylint: disable=consider-using-with
80
81 # Detect filename
82 filename = filename or req_info.get_filename() or os.path.basename(url)
</pre>
</div>
</div>
</div>
<div id="issue-291">
<div class="issue-block issue-sev-high">
<b>hashlib: </b> Use of weak MD5 hash for security. Consider usedforsecurity=False<br>
<b>Test ID:</b> B324<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/327.html" target="_blank">CWE-327</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/download.py</a><br>
<b>Line number: </b>124<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html</a><br>
<div class="code">
<pre>
120
121 if hash_type == &quot;sha256&quot;:
122 hash_func = hashlib.sha256()
123 elif hash_type == &quot;md5&quot;:
124 hash_func = hashlib.md5()
125 else:
126 raise ValueError
127
</pre>
</div>
</div>
</div>
<div id="issue-292">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py</a><br>
<b>Line number: </b>7<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
3 import importlib
4 import logging
5 import os
6 import re
7 import subprocess
8 import sys
9 from pathlib import Path
10 from typing import Dict
</pre>
</div>
</div>
</div>
<div id="issue-293">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py</a><br>
<b>Line number: </b>34<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
30
31
32 def get_git_branch():
33 try:
34 out = subprocess.check_output([&quot;git&quot;, &quot;branch&quot;]).decode(&quot;utf8&quot;)
35 current = next(line for line in out.split(&quot;\n&quot;) if line.startswith(&quot;*&quot;))
36 current.replace(&quot;* &quot;, &quot;&quot;)
37 except subprocess.CalledProcessError:
</pre>
</div>
</div>
</div>
<div id="issue-294">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py</a><br>
<b>Line number: </b>34<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
30
31
32 def get_git_branch():
33 try:
34 out = subprocess.check_output([&quot;git&quot;, &quot;branch&quot;]).decode(&quot;utf8&quot;)
35 current = next(line for line in out.split(&quot;\n&quot;) if line.startswith(&quot;*&quot;))
36 current.replace(&quot;* &quot;, &quot;&quot;)
37 except subprocess.CalledProcessError:
</pre>
</div>
</div>
</div>
<div id="issue-295">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py</a><br>
<b>Line number: </b>53<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
49 # except:
50 # raise RuntimeError(
51 # &quot; !! Commit before training to get the commit hash.&quot;)
52 try:
53 commit = subprocess.check_output([&quot;git&quot;, &quot;rev-parse&quot;, &quot;--short&quot;, &quot;HEAD&quot;]).decode().strip()
54 # Not copying .git folder into docker container
55 except (subprocess.CalledProcessError, FileNotFoundError):
56 commit = &quot;0000000&quot;
</pre>
</div>
</div>
</div>
<div id="issue-296">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/generic_utils.py</a><br>
<b>Line number: </b>53<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
49 # except:
50 # raise RuntimeError(
51 # &quot; !! Commit before training to get the commit hash.&quot;)
52 try:
53 commit = subprocess.check_output([&quot;git&quot;, &quot;rev-parse&quot;, &quot;--short&quot;, &quot;HEAD&quot;]).decode().strip()
54 # Not copying .git folder into docker container
55 except (subprocess.CalledProcessError, FileNotFoundError):
56 commit = &quot;0000000&quot;
</pre>
</div>
</div>
</div>
<div id="issue-297">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with pickle module.<br>
<b>Test ID:</b> B403<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/502.html" target="_blank">CWE-502</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/io.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/io.py</a><br>
<b>Line number: </b>2<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b403-import-pickle" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b403-import-pickle</a><br>
<div class="code">
<pre>
1 import os
2 import pickle as pickle_tts
3 from typing import Any, Callable, Dict, Union
4
5 import fsspec
6 import torch
7
8 from TTS.utils.generic_utils import get_user_data_dir
</pre>
</div>
</div>
</div>
<div id="issue-298">
<div class="issue-block issue-sev-low">
<b>try_except_pass: </b> Try, Except, Pass detected.<br>
<b>Test ID:</b> B110<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py</a><br>
<b>Line number: </b>406<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html</a><br>
<div class="code">
<pre>
402 # ToDo: we need a better way to handle it
403 if &quot;xtts&quot; in model_name:
404 try:
405 self.check_if_configs_are_equal(model_name, model_item, output_path)
406 except:
407 pass
408 else:
409 print(f&quot; &gt; {model_name} is already downloaded.&quot;)
410 else:
</pre>
</div>
</div>
</div>
<div id="issue-299">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py</a><br>
<b>Line number: </b>531<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
527 @staticmethod
528 def _download_zip_file(file_url, output_folder, progress_bar):
529 &quot;&quot;&quot;Download the github releases&quot;&quot;&quot;
530 # download the file
531 r = requests.get(file_url, stream=True)
532 # extract the file
533 try:
534 total_size_in_bytes = int(r.headers.get(&quot;content-length&quot;, 0))
</pre>
</div>
</div>
</div>
<div id="issue-300">
<div class="issue-block issue-sev-high">
<b>tarfile_unsafe_members: </b> tarfile.extractall used without any validation. Please check and discard dangerous members.<br>
<b>Test ID:</b> B202<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py</a><br>
<b>Line number: </b>545<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b202_tarfile_unsafe_members.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b202_tarfile_unsafe_members.html</a><br>
<div class="code">
<pre>
541 if progress_bar:
542 ModelManager.tqdm_progress.update(len(data))
543 file.write(data)
544 with zipfile.ZipFile(temp_zip_name) as z:
545 z.extractall(output_folder)
546 os.remove(temp_zip_name) # delete zip after extract
547 except zipfile.BadZipFile:
548 print(f&quot; &gt; Error: Bad zip file - {file_url}&quot;)
</pre>
</div>
</div>
</div>
<div id="issue-301">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py</a><br>
<b>Line number: </b>566<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
562 @staticmethod
563 def _download_tar_file(file_url, output_folder, progress_bar):
564 &quot;&quot;&quot;Download the github releases&quot;&quot;&quot;
565 # download the file
566 r = requests.get(file_url, stream=True)
567 # extract the file
568 try:
569 total_size_in_bytes = int(r.headers.get(&quot;content-length&quot;, 0))
</pre>
</div>
</div>
</div>
<div id="issue-302">
<div class="issue-block issue-sev-high">
<b>tarfile_unsafe_members: </b> tarfile.extractall used without any validation. Please check and discard dangerous members.<br>
<b>Test ID:</b> B202<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py</a><br>
<b>Line number: </b>580<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b202_tarfile_unsafe_members.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b202_tarfile_unsafe_members.html</a><br>
<div class="code">
<pre>
576 if progress_bar:
577 ModelManager.tqdm_progress.update(len(data))
578 file.write(data)
579 with tarfile.open(temp_tar_name) as t:
580 t.extractall(output_folder)
581 tar_names = t.getnames()
582 os.remove(temp_tar_name) # delete tar after extract
583 except tarfile.ReadError:
</pre>
</div>
</div>
</div>
<div id="issue-303">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/manage.py</a><br>
<b>Line number: </b>600<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
596 def _download_model_files(file_urls, output_folder, progress_bar):
597 &quot;&quot;&quot;Download the github releases&quot;&quot;&quot;
598 for file_url in file_urls:
599 # download the file
600 r = requests.get(file_url, stream=True)
601 # extract the file
602 bease_filename = file_url.split(&quot;/&quot;)[-1]
603 temp_zip_name = os.path.join(output_folder, bease_filename)
</pre>
</div>
</div>
</div>
<div id="issue-304">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/samplers.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/samplers.py</a><br>
<b>Line number: </b>52<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
48 drop_last=False,
49 label_key=&quot;class_name&quot;,
50 ):
51 super().__init__(dataset_items)
52 assert (
53 batch_size % (num_classes_in_batch * num_gpus) == 0
54 ), &quot;Batch size must be divisible by number of classes times the number of data parallel devices (if enabled).&quot;
55
56 label_indices = {}
57 for idx, item in enumerate(dataset_items):
</pre>
</div>
</div>
</div>
<div id="issue-305">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/synthesizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/utils/synthesizer.py</a><br>
<b>Line number: </b>90<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
86 self.seg = self._get_segmenter(&quot;en&quot;)
87 self.use_cuda = use_cuda
88 self.voice_dir = voice_dir
89 if self.use_cuda:
90 assert torch.cuda.is_available(), &quot;CUDA is not availabe on this machine.&quot;
91
92 if tts_checkpoint:
93 self._load_tts(tts_checkpoint, tts_config_path, use_cuda)
</pre>
</div>
</div>
</div>
<div id="issue-306">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/models/base_vc.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/models/base_vc.py</a><br>
<b>Line number: </b>197<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
193 # by cutting off from the largest duration indeces.
194 extra_frames = dur.sum() - mel_lengths[idx]
195 largest_idxs = torch.argsort(-dur)[:extra_frames]
196 dur[largest_idxs] -= 1
197 assert (
198 dur.sum() == mel_lengths[idx]
199 ), f&quot; [!] total duration {dur.sum()} vs spectrogram length {mel_lengths[idx]}&quot;
200 durations[idx, : text_lengths[idx]] = dur
201
202 # set stop targets wrt reduction factor
</pre>
</div>
</div>
</div>
<div id="issue-307">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/modules.py</a><br>
<b>Line number: </b>38<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
34 self.out_channels = out_channels
35 self.kernel_size = kernel_size
36 self.n_layers = n_layers
37 self.p_dropout = p_dropout
38 assert n_layers &gt; 1, &quot;Number of layers should be larger than 0.&quot;
39
40 self.conv_layers = nn.ModuleList()
41 self.norm_layers = nn.ModuleList()
</pre>
</div>
</div>
</div>
<div id="issue-308">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/modules.py</a><br>
<b>Line number: </b>107<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
103
104 class WN(torch.nn.Module):
105 def __init__(self, hidden_channels, kernel_size, dilation_rate, n_layers, gin_channels=0, p_dropout=0):
106 super(WN, self).__init__()
107 assert kernel_size % 2 == 1
108 self.hidden_channels = hidden_channels
109 self.kernel_size = (kernel_size,)
110 self.dilation_rate = dilation_rate
</pre>
</div>
</div>
</div>
<div id="issue-309">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/modules.py</a><br>
<b>Line number: </b>350<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
346 p_dropout=0,
347 gin_channels=0,
348 mean_only=False,
349 ):
350 assert channels % 2 == 0, &quot;channels should be divisible by 2&quot;
351 super().__init__()
352 self.channels = channels
353 self.hidden_channels = hidden_channels
</pre>
</div>
</div>
</div>
<div id="issue-310">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/speaker_encoder/speaker_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/speaker_encoder/speaker_encoder.py</a><br>
<b>Line number: </b>89<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
85 :return: the waveform slices and mel spectrogram slices as lists of array slices. Index
86 respectively the waveform and the mel spectrogram with these slices to obtain the partial
87 utterances.
88 &quot;&quot;&quot;
89 assert 0 &lt; min_coverage &lt;= 1
90
91 # Compute how many frames separate two partial utterances
92 samples_per_frame = int((sampling_rate * mel_window_step / 1000))
</pre>
</div>
</div>
</div>
<div id="issue-311">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/speaker_encoder/speaker_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/speaker_encoder/speaker_encoder.py</a><br>
<b>Line number: </b>95<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
91 # Compute how many frames separate two partial utterances
92 samples_per_frame = int((sampling_rate * mel_window_step / 1000))
93 n_frames = int(np.ceil((n_samples + 1) / samples_per_frame))
94 frame_step = int(np.round((sampling_rate / rate) / samples_per_frame))
95 assert 0 &lt; frame_step, &quot;The rate is too high&quot;
96 assert frame_step &lt;= partials_n_frames, &quot;The rate is too low, it should be %f at least&quot; % (
97 sampling_rate / (samples_per_frame * partials_n_frames)
98 )
</pre>
</div>
</div>
</div>
<div id="issue-312">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/speaker_encoder/speaker_encoder.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/speaker_encoder/speaker_encoder.py</a><br>
<b>Line number: </b>96<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
92 samples_per_frame = int((sampling_rate * mel_window_step / 1000))
93 n_frames = int(np.ceil((n_samples + 1) / samples_per_frame))
94 frame_step = int(np.round((sampling_rate / rate) / samples_per_frame))
95 assert 0 &lt; frame_step, &quot;The rate is too high&quot;
96 assert frame_step &lt;= partials_n_frames, &quot;The rate is too low, it should be %f at least&quot; % (
97 sampling_rate / (samples_per_frame * partials_n_frames)
98 )
99
100 # Compute the slices
101 wav_slices, mel_slices = [], []
</pre>
</div>
</div>
</div>
<div id="issue-313">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.<br>
<b>Test ID:</b> B310<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/__init__.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/__init__.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen</a><br>
<div class="code">
<pre>
20
21 output_path = os.path.join(output_path, &quot;WavLM-Large.pt&quot;)
22 if not os.path.exists(output_path):
23 print(f&quot; &gt; Downloading WavLM model to {output_path} ...&quot;)
24 urllib.request.urlretrieve(model_uri, output_path)
25
26 checkpoint = torch.load(output_path, map_location=torch.device(device))
27 cfg = WavLMConfig(checkpoint[&quot;cfg&quot;])
</pre>
</div>
</div>
</div>
<div id="issue-314">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>222<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
218 if p &lt;= 0:
219 return module
220
221 # supported modules
222 assert isinstance(module, (nn.Linear, nn.Embedding, nn.Conv2d))
223
224 # test whether module.weight has the right sizes wrt block_size
225 is_conv = module.weight.ndim == 4
</pre>
</div>
</div>
</div>
<div id="issue-315">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>229<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
225 is_conv = module.weight.ndim == 4
226
227 # 2D matrix
228 if not is_conv:
229 assert module.weight.size(1) % block_size == 0, &quot;Input features must be a multiple of block sizes&quot;
230
231 # 4D matrix
232 else:
</pre>
</div>
</div>
</div>
<div id="issue-316">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>235<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
231 # 4D matrix
232 else:
233 # 1x1 convolutions
234 if module.kernel_size == (1, 1):
235 assert module.in_channels % block_size == 0, &quot;Input channels must be a multiple of block sizes&quot;
236 # regular convolutions
237 else:
238 k = module.kernel_size[0] * module.kernel_size[1]
</pre>
</div>
</div>
</div>
<div id="issue-317">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>239<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
235 assert module.in_channels % block_size == 0, &quot;Input channels must be a multiple of block sizes&quot;
236 # regular convolutions
237 else:
238 k = module.kernel_size[0] * module.kernel_size[1]
239 assert k % block_size == 0, &quot;Kernel size must be a multiple of block size&quot;
240
241 def _forward_pre_hook(mod, input):
242 # no noise for evaluation
</pre>
</div>
</div>
</div>
<div id="issue-318">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>327<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
323
324 self.head_dim = embed_dim // num_heads
325 self.q_head_dim = self.head_dim
326 self.k_head_dim = self.head_dim
327 assert self.head_dim * num_heads == self.embed_dim, &quot;embed_dim must be divisible by num_heads&quot;
328 self.scaling = self.head_dim**-0.5
329
330 self.self_attention = self_attention
</pre>
</div>
</div>
</div>
<div id="issue-319">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>333<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
329
330 self.self_attention = self_attention
331 self.encoder_decoder_attention = encoder_decoder_attention
332
333 assert not self.self_attention or self.qkv_same_dim, (
334 &quot;Self-attention requires query, key and &quot; &quot;value to be of the same size&quot;
335 )
336
337 k_bias = True
338 if rescale_init:
</pre>
</div>
</div>
</div>
<div id="issue-320">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>462<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
458 is_tpu = query.device.type == &quot;xla&quot;
459
460 tgt_len, bsz, embed_dim = query.size()
461 src_len = tgt_len
462 assert embed_dim == self.embed_dim
463 assert list(query.size()) == [tgt_len, bsz, embed_dim]
464 if key is not None:
465 src_len, key_bsz, _ = key.size()
</pre>
</div>
</div>
</div>
<div id="issue-321">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>463<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
459
460 tgt_len, bsz, embed_dim = query.size()
461 src_len = tgt_len
462 assert embed_dim == self.embed_dim
463 assert list(query.size()) == [tgt_len, bsz, embed_dim]
464 if key is not None:
465 src_len, key_bsz, _ = key.size()
466 if not torch.jit.is_scripting():
</pre>
</div>
</div>
</div>
<div id="issue-322">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>467<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
463 assert list(query.size()) == [tgt_len, bsz, embed_dim]
464 if key is not None:
465 src_len, key_bsz, _ = key.size()
466 if not torch.jit.is_scripting():
467 assert key_bsz == bsz
468 assert value is not None
469 assert src_len, bsz == value.shape[:2]
470
</pre>
</div>
</div>
</div>
<div id="issue-323">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>468<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
464 if key is not None:
465 src_len, key_bsz, _ = key.size()
466 if not torch.jit.is_scripting():
467 assert key_bsz == bsz
468 assert value is not None
469 assert src_len, bsz == value.shape[:2]
470
471 if self.has_relative_attention_bias and position_bias is None:
</pre>
</div>
</div>
</div>
<div id="issue-324">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>469<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
465 src_len, key_bsz, _ = key.size()
466 if not torch.jit.is_scripting():
467 assert key_bsz == bsz
468 assert value is not None
469 assert src_len, bsz == value.shape[:2]
470
471 if self.has_relative_attention_bias and position_bias is None:
472 position_bias = self.compute_bias(tgt_len, src_len)
</pre>
</div>
</div>
</div>
<div id="issue-325">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>484<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
480 # treats bias in linear module as method.
481 and not torch.jit.is_scripting()
482 and self.q_head_dim == self.head_dim
483 ):
484 assert key is not None and value is not None
485 assert attn_mask is None
486
487 attn_mask_rel_pos = None
</pre>
</div>
</div>
</div>
<div id="issue-326">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>485<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
481 and not torch.jit.is_scripting()
482 and self.q_head_dim == self.head_dim
483 ):
484 assert key is not None and value is not None
485 assert attn_mask is None
486
487 attn_mask_rel_pos = None
488 if position_bias is not None:
</pre>
</div>
</div>
</div>
<div id="issue-327">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>540<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
536 if saved_state is not None and &quot;prev_key&quot; in saved_state:
537 # previous time steps are cached - no need to recompute
538 # key and value if they are static
539 if static_kv:
540 assert self.encoder_decoder_attention and not self.self_attention
541 key = value = None
542 else:
543 saved_state = None
</pre>
</div>
</div>
</div>
<div id="issue-328">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>553<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
549 elif self.encoder_decoder_attention:
550 # encoder-decoder attention
551 q = self.q_proj(query)
552 if key is None:
553 assert value is None
554 k = v = None
555 else:
556 k = self.k_proj(key)
</pre>
</div>
</div>
</div>
<div id="issue-329">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>560<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
556 k = self.k_proj(key)
557 v = self.v_proj(key)
558
559 else:
560 assert key is not None and value is not None
561 q = self.q_proj(query)
562 k = self.k_proj(key)
563 v = self.v_proj(value)
</pre>
</div>
</div>
</div>
<div id="issue-330">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>567<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
563 v = self.v_proj(value)
564 q *= self.scaling
565
566 if self.bias_k is not None:
567 assert self.bias_v is not None
568 k = torch.cat([k, self.bias_k.repeat(1, bsz, 1)])
569 v = torch.cat([v, self.bias_v.repeat(1, bsz, 1)])
570 if attn_mask is not None:
</pre>
</div>
</div>
</div>
<div id="issue-331">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>591<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
587 if saved_state is not None:
588 # saved states are stored with shape (bsz, num_heads, seq_len, head_dim)
589 if &quot;prev_key&quot; in saved_state:
590 _prev_key = saved_state[&quot;prev_key&quot;]
591 assert _prev_key is not None
592 prev_key = _prev_key.view(bsz * self.num_heads, -1, self.head_dim)
593 if static_kv:
594 k = prev_key
</pre>
</div>
</div>
</div>
<div id="issue-332">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>596<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
592 prev_key = _prev_key.view(bsz * self.num_heads, -1, self.head_dim)
593 if static_kv:
594 k = prev_key
595 else:
596 assert k is not None
597 k = torch.cat([prev_key, k], dim=1)
598 src_len = k.size(1)
599 if &quot;prev_value&quot; in saved_state:
</pre>
</div>
</div>
</div>
<div id="issue-333">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>601<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
597 k = torch.cat([prev_key, k], dim=1)
598 src_len = k.size(1)
599 if &quot;prev_value&quot; in saved_state:
600 _prev_value = saved_state[&quot;prev_value&quot;]
601 assert _prev_value is not None
602 prev_value = _prev_value.view(bsz * self.num_heads, -1, self.head_dim)
603 if static_kv:
604 v = prev_value
</pre>
</div>
</div>
</div>
<div id="issue-334">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>606<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
602 prev_value = _prev_value.view(bsz * self.num_heads, -1, self.head_dim)
603 if static_kv:
604 v = prev_value
605 else:
606 assert v is not None
607 v = torch.cat([prev_value, v], dim=1)
608 prev_key_padding_mask: Optional[Tensor] = None
609 if &quot;prev_key_padding_mask&quot; in saved_state:
</pre>
</div>
</div>
</div>
<div id="issue-335">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>611<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
607 v = torch.cat([prev_value, v], dim=1)
608 prev_key_padding_mask: Optional[Tensor] = None
609 if &quot;prev_key_padding_mask&quot; in saved_state:
610 prev_key_padding_mask = saved_state[&quot;prev_key_padding_mask&quot;]
611 assert k is not None and v is not None
612 key_padding_mask = MultiheadAttention._append_prev_key_padding_mask(
613 key_padding_mask=key_padding_mask,
614 prev_key_padding_mask=prev_key_padding_mask,
</pre>
</div>
</div>
</div>
<div id="issue-336">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>624<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
620 saved_state[&quot;prev_key&quot;] = k.view(bsz, self.num_heads, -1, self.head_dim)
621 saved_state[&quot;prev_value&quot;] = v.view(bsz, self.num_heads, -1, self.head_dim)
622 saved_state[&quot;prev_key_padding_mask&quot;] = key_padding_mask
623 # In this branch incremental_state is never None
624 assert incremental_state is not None
625 incremental_state = self._set_input_buffer(incremental_state, saved_state)
626 assert k is not None
627 assert k.size(1) == src_len
</pre>
</div>
</div>
</div>
<div id="issue-337">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>626<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
622 saved_state[&quot;prev_key_padding_mask&quot;] = key_padding_mask
623 # In this branch incremental_state is never None
624 assert incremental_state is not None
625 incremental_state = self._set_input_buffer(incremental_state, saved_state)
626 assert k is not None
627 assert k.size(1) == src_len
628
629 # This is part of a workaround to get around fork/join parallelism
</pre>
</div>
</div>
</div>
<div id="issue-338">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>627<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
623 # In this branch incremental_state is never None
624 assert incremental_state is not None
625 incremental_state = self._set_input_buffer(incremental_state, saved_state)
626 assert k is not None
627 assert k.size(1) == src_len
628
629 # This is part of a workaround to get around fork/join parallelism
630 # not supporting Optional types.
</pre>
</div>
</div>
</div>
<div id="issue-339">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>635<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
631 if key_padding_mask is not None and key_padding_mask.dim() == 0:
632 key_padding_mask = None
633
634 if key_padding_mask is not None:
635 assert key_padding_mask.size(0) == bsz
636 assert key_padding_mask.size(1) == src_len
637
638 if self.add_zero_attn:
</pre>
</div>
</div>
</div>
<div id="issue-340">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>636<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
632 key_padding_mask = None
633
634 if key_padding_mask is not None:
635 assert key_padding_mask.size(0) == bsz
636 assert key_padding_mask.size(1) == src_len
637
638 if self.add_zero_attn:
639 assert v is not None
</pre>
</div>
</div>
</div>
<div id="issue-341">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>639<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
635 assert key_padding_mask.size(0) == bsz
636 assert key_padding_mask.size(1) == src_len
637
638 if self.add_zero_attn:
639 assert v is not None
640 src_len += 1
641 k = torch.cat([k, k.new_zeros((k.size(0), 1) + k.size()[2:])], dim=1)
642 v = torch.cat([v, v.new_zeros((v.size(0), 1) + v.size()[2:])], dim=1)
</pre>
</div>
</div>
</div>
<div id="issue-342">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>657<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
653
654 attn_weights = torch.bmm(q, k.transpose(1, 2))
655 attn_weights = self.apply_sparse_mask(attn_weights, tgt_len, src_len, bsz)
656
657 assert list(attn_weights.size()) == [bsz * self.num_heads, tgt_len, src_len]
658
659 if attn_mask is not None:
660 attn_mask = attn_mask.unsqueeze(0)
</pre>
</div>
</div>
</div>
<div id="issue-343">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>698<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
694 attn_weights_float = F.softmax(attn_weights, dim=-1)
695 attn_weights = attn_weights_float.type_as(attn_weights)
696 attn_probs = self.dropout_module(attn_weights)
697
698 assert v is not None
699 attn = torch.bmm(attn_probs, v)
700 assert list(attn.size()) == [bsz * self.num_heads, tgt_len, self.head_dim]
701 attn = attn.transpose(0, 1).contiguous().view(tgt_len, bsz, embed_dim)
</pre>
</div>
</div>
</div>
<div id="issue-344">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/modules.py</a><br>
<b>Line number: </b>700<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
696 attn_probs = self.dropout_module(attn_weights)
697
698 assert v is not None
699 attn = torch.bmm(attn_probs, v)
700 assert list(attn.size()) == [bsz * self.num_heads, tgt_len, self.head_dim]
701 attn = attn.transpose(0, 1).contiguous().view(tgt_len, bsz, embed_dim)
702 attn = self.out_proj(attn)
703 attn_weights: Optional[Tensor] = None
</pre>
</div>
</div>
</div>
<div id="issue-345">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Use of possibly insecure function - consider using safer ast.literal_eval.<br>
<b>Test ID:</b> B307<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py</a><br>
<b>Line number: </b>227<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b307-eval" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b307-eval</a><br>
<div class="code">
<pre>
223 super().__init__()
224 logger.info(f&quot;WavLM Config: {cfg.__dict__}&quot;)
225
226 self.cfg = cfg
227 feature_enc_layers = eval(cfg.conv_feature_layers)
228 self.embed = feature_enc_layers[-1][0]
229
230 self.feature_extractor = ConvFeatureExtractionModel(
</pre>
</div>
</div>
</div>
<div id="issue-346">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py</a><br>
<b>Line number: </b>374<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
370 conv_type: str = &quot;default&quot;,
371 ):
372 super().__init__()
373
374 assert mode in {&quot;default&quot;, &quot;layer_norm&quot;}
375
376 def block(
377 n_in,
</pre>
</div>
</div>
</div>
<div id="issue-347">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py</a><br>
<b>Line number: </b>390<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
386 conv = nn.Conv1d(n_in, n_out, k, stride=stride, bias=conv_bias)
387 nn.init.kaiming_normal_(conv.weight)
388 return conv
389
390 assert (is_layer_norm and is_group_norm) == False, &quot;layer norm and group norm are exclusive&quot;
391
392 if is_layer_norm:
393 return nn.Sequential(
</pre>
</div>
</div>
</div>
<div id="issue-348">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py</a><br>
<b>Line number: </b>418<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
414 if self.conv_type == &quot;default&quot;:
415 in_d = 1
416 self.conv_layers = nn.ModuleList()
417 for i, cl in enumerate(conv_layers):
418 assert len(cl) == 3, &quot;invalid conv definition: &quot; + str(cl)
419 (dim, k, stride) = cl
420
421 self.conv_layers.append(
</pre>
</div>
</div>
</div>
<div id="issue-349">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py</a><br>
<b>Line number: </b>437<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
433 elif self.conv_type == &quot;conv2d&quot;:
434 in_d = 1
435 self.conv_layers = nn.ModuleList()
436 for i, cl in enumerate(conv_layers):
437 assert len(cl) == 3
438 (dim, k, stride) = cl
439
440 self.conv_layers.append(torch.nn.Conv2d(in_d, dim, k, stride))
</pre>
</div>
</div>
</div>
<div id="issue-350">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vc/modules/freevc/wavlm/wavlm.py</a><br>
<b>Line number: </b>448<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
444 in_d = 1
445 idim = 80
446 self.conv_layers = nn.ModuleList()
447 for i, cl in enumerate(conv_layers):
448 assert len(cl) == 3
449 (dim, k, stride) = cl
450 self.conv_layers.append(torch.nn.Conv2d(in_d, dim, k, stride, padding=1))
451 self.conv_layers.append(torch.nn.LayerNorm([dim, idim]))
</pre>
</div>
</div>
</div>
<div id="issue-351">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/gan_dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/gan_dataset.py</a><br>
<b>Line number: </b>48<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
44 self.use_cache = use_cache
45 self.use_noise_augment = use_noise_augment
46 self.verbose = verbose
47
48 assert seq_len % hop_len == 0, &quot; [!] seq_len has to be a multiple of hop_len.&quot;
49 self.feat_frame_len = seq_len // hop_len + (2 * conv_pad)
50
51 # map G and D instances
</pre>
</div>
</div>
</div>
<div id="issue-352">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/gan_dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/gan_dataset.py</a><br>
<b>Line number: </b>134<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
130
131 # correct the audio length wrt padding applied in stft
132 audio = np.pad(audio, (0, self.hop_len), mode=&quot;edge&quot;)
133 audio = audio[: mel.shape[-1] * self.hop_len]
134 assert (
135 mel.shape[-1] * self.hop_len == audio.shape[-1]
136 ), f&quot; [!] {mel.shape[-1] * self.hop_len} vs {audio.shape[-1]}&quot;
137
138 audio = torch.from_numpy(audio).float().unsqueeze(0)
139 mel = torch.from_numpy(mel).float().squeeze(0)
</pre>
</div>
</div>
</div>
<div id="issue-353">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/gan_dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/gan_dataset.py</a><br>
<b>Line number: </b>143<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
139 mel = torch.from_numpy(mel).float().squeeze(0)
140
141 if self.return_segments:
142 max_mel_start = mel.shape[1] - self.feat_frame_len
143 mel_start = random.randint(0, max_mel_start)
144 mel_end = mel_start + self.feat_frame_len
145 mel = mel[:, mel_start:mel_end]
146
</pre>
</div>
</div>
</div>
<div id="issue-354">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/preprocess.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/preprocess.py</a><br>
<b>Line number: </b>53<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
49
50
51 def load_wav_data(data_path, eval_split_size, file_ext=&quot;wav&quot;):
52 wav_paths = find_wav_files(data_path, file_ext=file_ext)
53 assert len(wav_paths) &gt; 0, f&quot; [!] {data_path} is empty.&quot;
54 np.random.seed(0)
55 np.random.shuffle(wav_paths)
56 return wav_paths[:eval_split_size], wav_paths[eval_split_size:]
</pre>
</div>
</div>
</div>
<div id="issue-355">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/preprocess.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/preprocess.py</a><br>
<b>Line number: </b>66<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
62
63 wav_paths.sort(key=lambda x: Path(x).stem)
64 feat_paths.sort(key=lambda x: Path(x).stem)
65
66 assert len(wav_paths) == len(feat_paths), f&quot; [!] {len(wav_paths)} vs {feat_paths}&quot;
67 for wav, feat in zip(wav_paths, feat_paths):
68 wav_name = Path(wav).stem
69 feat_name = Path(feat).stem
</pre>
</div>
</div>
</div>
<div id="issue-356">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/preprocess.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/preprocess.py</a><br>
<b>Line number: </b>70<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
66 assert len(wav_paths) == len(feat_paths), f&quot; [!] {len(wav_paths)} vs {feat_paths}&quot;
67 for wav, feat in zip(wav_paths, feat_paths):
68 wav_name = Path(wav).stem
69 feat_name = Path(feat).stem
70 assert wav_name == feat_name
71
72 items = list(zip(wav_paths, feat_paths))
73 np.random.seed(0)
</pre>
</div>
</div>
</div>
<div id="issue-357">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavegrad_dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavegrad_dataset.py</a><br>
<b>Line number: </b>47<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
43 self.use_noise_augment = use_noise_augment
44 self.verbose = verbose
45
46 if return_segments:
47 assert seq_len % hop_len == 0, &quot; [!] seq_len has to be a multiple of hop_len.&quot;
48 self.feat_frame_len = seq_len // hop_len + (2 * conv_pad)
49
50 # cache acoustic features
</pre>
</div>
</div>
</div>
<div id="issue-358">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavegrad_dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavegrad_dataset.py</a><br>
<b>Line number: </b>108<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
104 if audio.shape[-1] &lt; self.seq_len + self.pad_short:
105 audio = np.pad(
106 audio, (0, self.seq_len + self.pad_short - len(audio)), mode=&quot;constant&quot;, constant_values=0.0
107 )
108 assert (
109 audio.shape[-1] &gt;= self.seq_len + self.pad_short
110 ), f&quot;{audio.shape[-1]} vs {self.seq_len + self.pad_short}&quot;
111
112 # correct the audio length wrt hop length
113 p = (audio.shape[-1] // self.hop_len + 1) * self.hop_len - audio.shape[-1]
</pre>
</div>
</div>
</div>
<div id="issue-359">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavegrad_dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavegrad_dataset.py</a><br>
<b>Line number: </b>121<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
117 self.cache[idx] = audio
118
119 if self.return_segments:
120 max_start = len(audio) - self.seq_len
121 start = random.randint(0, max_start)
122 end = start + self.seq_len
123 audio = audio[start:end]
124
</pre>
</div>
</div>
</div>
<div id="issue-360">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavernn_dataset.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/datasets/wavernn_dataset.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 self.is_training = is_training
28 self.verbose = verbose
29 self.return_segments = return_segments
30
31 assert self.seq_len % self.hop_len == 0
32
33 def __len__(self):
34 return len(self.item_list)
</pre>
</div>
</div>
</div>
<div id="issue-361">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/losses.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/losses.py</a><br>
<b>Line number: </b>229<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
225 &quot;&quot;&quot;
226
227 def __init__(self, C):
228 super().__init__()
229 assert not (
230 C.use_mse_gan_loss and C.use_hinge_gan_loss
231 ), &quot; [!] Cannot use HingeGANLoss and MSEGANLoss together.&quot;
232
233 self.use_stft_loss = C.use_stft_loss if &quot;use_stft_loss&quot; in C else False
234 self.use_subband_stft_loss = C.use_subband_stft_loss if &quot;use_subband_stft_loss&quot; in C else False
</pre>
</div>
</div>
</div>
<div id="issue-362">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/losses.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/losses.py</a><br>
<b>Line number: </b>258<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
254 self.hinge_loss = HingeGLoss()
255 if C.use_feat_match_loss:
256 self.feat_match_loss = MelganFeatureLoss()
257 if C.use_l1_spec_loss:
258 assert C.audio[&quot;sample_rate&quot;] == C.l1_spec_loss_params[&quot;sample_rate&quot;]
259 self.l1_spec_loss = L1SpecLoss(**C.l1_spec_loss_params)
260
261 def forward(
</pre>
</div>
</div>
</div>
<div id="issue-363">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/losses.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/losses.py</a><br>
<b>Line number: </b>316<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
312 &quot;&quot;&quot;Like ```GeneratorLoss```&quot;&quot;&quot;
313
314 def __init__(self, C):
315 super().__init__()
316 assert not (
317 C.use_mse_gan_loss and C.use_hinge_gan_loss
318 ), &quot; [!] Cannot use HingeGANLoss and MSEGANLoss together.&quot;
319
320 self.use_mse_gan_loss = C.use_mse_gan_loss
321 self.use_hinge_gan_loss = C.use_hinge_gan_loss
</pre>
</div>
</div>
</div>
<div id="issue-364">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/lvc_block.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/lvc_block.py</a><br>
<b>Line number: </b>178<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
174 &quot;&quot;&quot;
175 batch, _, in_length = x.shape
176 batch, _, out_channels, kernel_size, kernel_length = kernel.shape
177
178 assert in_length == (
179 kernel_length * hop_size
180 ), f&quot;length of (x, kernel) is not matched, {in_length} vs {kernel_length * hop_size}&quot;
181
182 padding = dilation * int((kernel_size - 1) / 2)
183 x = F.pad(x, (padding, padding), &quot;constant&quot;, 0) # (batch, in_channels, in_length + 2*padding)
</pre>
</div>
</div>
</div>
<div id="issue-365">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/melgan.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/melgan.py</a><br>
<b>Line number: </b>10<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
6 class ResidualStack(nn.Module):
7 def __init__(self, channels, num_res_blocks, kernel_size):
8 super().__init__()
9
10 assert (kernel_size - 1) % 2 == 0, &quot; [!] kernel_size has to be odd.&quot;
11 base_padding = (kernel_size - 1) // 2
12
13 self.blocks = nn.ModuleList()
</pre>
</div>
</div>
</div>
<div id="issue-366">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/parallel_wavegan.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/parallel_wavegan.py</a><br>
<b>Line number: </b>26<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
22 # no future time stamps available
23 if use_causal_conv:
24 padding = (kernel_size - 1) * dilation
25 else:
26 assert (kernel_size - 1) % 2 == 0, &quot;Not support even number kernel size.&quot;
27 padding = (kernel_size - 1) // 2 * dilation
28 self.use_causal_conv = use_causal_conv
29
</pre>
</div>
</div>
</div>
<div id="issue-367">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/parallel_wavegan.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/parallel_wavegan.py</a><br>
<b>Line number: </b>64<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
60 xa, xb = x.split(x.size(splitdim) // 2, dim=splitdim)
61
62 # local conditioning
63 if c is not None:
64 assert self.conv1x1_aux is not None
65 c = self.conv1x1_aux(c)
66 ca, cb = c.split(c.size(splitdim) // 2, dim=splitdim)
67 xa, xb = xa + ca, xb + cb
</pre>
</div>
</div>
</div>
<div id="issue-368">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/upsample.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/upsample.py</a><br>
<b>Line number: </b>40<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
36 stretch = Stretch2d(scale, 1, interpolate_mode)
37 self.up_layers += [stretch]
38
39 # conv layer
40 assert (freq_axis_kernel_size - 1) % 2 == 0, &quot;Not support even number freq axis kernel size.&quot;
41 freq_axis_padding = (freq_axis_kernel_size - 1) // 2
42 kernel_size = (freq_axis_kernel_size, scale * 2 + 1)
43 if use_causal_conv:
</pre>
</div>
</div>
</div>
<div id="issue-369">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/wavegrad.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/wavegrad.py</a><br>
<b>Line number: </b>77<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
73
74 class UBlock(nn.Module):
75 def __init__(self, input_size, hidden_size, factor, dilation):
76 super().__init__()
77 assert isinstance(dilation, (list, tuple))
78 assert len(dilation) == 4
79
80 self.factor = factor
</pre>
</div>
</div>
</div>
<div id="issue-370">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/wavegrad.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/layers/wavegrad.py</a><br>
<b>Line number: </b>78<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
74 class UBlock(nn.Module):
75 def __init__(self, input_size, hidden_size, factor, dilation):
76 super().__init__()
77 assert isinstance(dilation, (list, tuple))
78 assert len(dilation) == 4
79
80 self.factor = factor
81 self.res_block = Conv1d(input_size, hidden_size, 1)
</pre>
</div>
</div>
</div>
<div id="issue-371">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/hifigan_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/hifigan_generator.py</a><br>
<b>Line number: </b>300<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
296 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;), cache=cache)
297 self.load_state_dict(state[&quot;model&quot;])
298 if eval:
299 self.eval()
300 assert not self.training
301 self.remove_weight_norm()
</pre>
</div>
</div>
</div>
<div id="issue-372">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/melgan_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/melgan_generator.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 ):
20 super().__init__()
21
22 # assert model parameters
23 assert (proj_kernel - 1) % 2 == 0, &quot; [!] proj_kernel should be an odd number.&quot;
24
25 # setup additional model parameters
26 base_padding = (proj_kernel - 1) // 2
</pre>
</div>
</div>
</div>
<div id="issue-373">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/melgan_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/melgan_generator.py</a><br>
<b>Line number: </b>94<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
90 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;), cache=cache)
91 self.load_state_dict(state[&quot;model&quot;])
92 if eval:
93 self.eval()
94 assert not self.training
95 self.remove_weight_norm()
</pre>
</div>
</div>
</div>
<div id="issue-374">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 nonlinear_activation_params={&quot;negative_slope&quot;: 0.2},
28 bias=True,
29 ):
30 super().__init__()
31 assert (kernel_size - 1) % 2 == 0, &quot; [!] does not support even number kernel size.&quot;
32 assert dilation_factor &gt; 0, &quot; [!] dilation factor must be &gt; 0.&quot;
33 self.conv_layers = nn.ModuleList()
34 conv_in_channels = in_channels
</pre>
</div>
</div>
</div>
<div id="issue-375">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py</a><br>
<b>Line number: </b>32<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
28 bias=True,
29 ):
30 super().__init__()
31 assert (kernel_size - 1) % 2 == 0, &quot; [!] does not support even number kernel size.&quot;
32 assert dilation_factor &gt; 0, &quot; [!] dilation factor must be &gt; 0.&quot;
33 self.conv_layers = nn.ModuleList()
34 conv_in_channels = in_channels
35 for i in range(num_layers - 1):
</pre>
</div>
</div>
</div>
<div id="issue-376">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py</a><br>
<b>Line number: </b>105<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
101 nonlinear_activation=&quot;LeakyReLU&quot;,
102 nonlinear_activation_params={&quot;negative_slope&quot;: 0.2},
103 ):
104 super().__init__()
105 assert (kernel_size - 1) % 2 == 0, &quot;Not support even number kernel size.&quot;
106
107 self.in_channels = in_channels
108 self.out_channels = out_channels
</pre>
</div>
</div>
</div>
<div id="issue-377">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_discriminator.py</a><br>
<b>Line number: </b>115<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
111 self.kernel_size = kernel_size
112 self.res_factor = math.sqrt(1.0 / num_layers)
113
114 # check the number of num_layers and stacks
115 assert num_layers % stacks == 0
116 layers_per_stack = num_layers // stacks
117
118 # define first convolution
</pre>
</div>
</div>
</div>
<div id="issue-378">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py</a><br>
<b>Line number: </b>50<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
46 self.inference_padding = inference_padding
47 self.use_weight_norm = use_weight_norm
48
49 # check the number of layers and stacks
50 assert num_res_blocks % stacks == 0
51 layers_per_stack = num_res_blocks // stacks
52
53 # define first convolution
</pre>
</div>
</div>
</div>
<div id="issue-379">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py</a><br>
<b>Line number: </b>101<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
97
98 # perform upsampling
99 if c is not None and self.upsample_net is not None:
100 c = self.upsample_net(c)
101 assert (
102 c.shape[-1] == x.shape[-1]
103 ), f&quot; [!] Upsampling scale does not match the expected output. {c.shape} vs {x.shape}&quot;
104
105 # encode to hidden representation
106 x = self.first_conv(x)
</pre>
</div>
</div>
</div>
<div id="issue-380">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py</a><br>
<b>Line number: </b>146<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
142 self.apply(_apply_weight_norm)
143
144 @staticmethod
145 def _get_receptive_field_size(layers, stacks, kernel_size, dilation=lambda x: 2**x):
146 assert layers % stacks == 0
147 layers_per_cycle = layers // stacks
148 dilations = [dilation(i % layers_per_cycle) for i in range(layers)]
149 return (kernel_size - 1) * sum(dilations) + 1
</pre>
</div>
</div>
</div>
<div id="issue-381">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/parallel_wavegan_generator.py</a><br>
<b>Line number: </b>162<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
158 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;), cache=cache)
159 self.load_state_dict(state[&quot;model&quot;])
160 if eval:
161 self.eval()
162 assert not self.training
163 if self.use_weight_norm:
164 self.remove_weight_norm()
</pre>
</div>
</div>
</div>
<div id="issue-382">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py</a><br>
<b>Line number: </b>67<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
63 class ConditionalDiscriminator(nn.Module):
64 def __init__(self, in_channels, cond_channels, downsample_factors=(2, 2, 2), out_channels=(128, 256)):
65 super().__init__()
66
67 assert len(downsample_factors) == len(out_channels) + 1
68
69 self.in_channels = in_channels
70 self.cond_channels = cond_channels
</pre>
</div>
</div>
</div>
<div id="issue-383">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py</a><br>
<b>Line number: </b>158<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
154 self.base_window_size = self.hop_length * 2
155 self.ks = [ws // self.base_window_size for ws in window_sizes]
156
157 # check arguments
158 assert len(cond_disc_downsample_factors) == len(cond_disc_out_channels) == len(window_sizes)
159 for ws in window_sizes:
160 assert ws % hop_length == 0
161
</pre>
</div>
</div>
</div>
<div id="issue-384">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py</a><br>
<b>Line number: </b>160<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
156
157 # check arguments
158 assert len(cond_disc_downsample_factors) == len(cond_disc_out_channels) == len(window_sizes)
159 for ws in window_sizes:
160 assert ws % hop_length == 0
161
162 for idx, cf in enumerate(cond_disc_downsample_factors):
163 assert np.prod(cf) == hop_length // self.ks[idx]
</pre>
</div>
</div>
</div>
<div id="issue-385">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/random_window_discriminator.py</a><br>
<b>Line number: </b>163<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
159 for ws in window_sizes:
160 assert ws % hop_length == 0
161
162 for idx, cf in enumerate(cond_disc_downsample_factors):
163 assert np.prod(cf) == hop_length // self.ks[idx]
164
165 # define layers
166 self.unconditional_discriminators = nn.ModuleList([])
</pre>
</div>
</div>
</div>
<div id="issue-386">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/univnet_generator.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/univnet_generator.py</a><br>
<b>Line number: </b>135<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
131 self.apply(_apply_weight_norm)
132
133 @staticmethod
134 def _get_receptive_field_size(layers, stacks, kernel_size, dilation=lambda x: 2**x):
135 assert layers % stacks == 0
136 layers_per_cycle = layers // stacks
137 dilations = [dilation(i % layers_per_cycle) for i in range(layers)]
138 return (kernel_size - 1) * sum(dilations) + 1
</pre>
</div>
</div>
</div>
<div id="issue-387">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/wavegrad.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/wavegrad.py</a><br>
<b>Line number: </b>228<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
224 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;), cache=cache)
225 self.load_state_dict(state[&quot;model&quot;])
226 if eval:
227 self.eval()
228 assert not self.training
229 if self.config.model_params.use_weight_norm:
230 self.remove_weight_norm()
231 betas = np.linspace(
</pre>
</div>
</div>
</div>
<div id="issue-388">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/wavernn.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/wavernn.py</a><br>
<b>Line number: </b>241<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
237 self.ap = AudioProcessor(**config.audio.to_dict())
238 self.aux_dims = self.args.res_out_dims // 4
239
240 if self.args.use_upsample_net:
241 assert (
242 np.cumproduct(self.args.upsample_factors)[-1] == config.audio.hop_length
243 ), &quot; [!] upsample scales needs to be equal to hop_length&quot;
244 self.upsample = UpsampleNetwork(
245 self.args.feat_dims,
246 self.args.upsample_factors,
</pre>
</div>
</div>
</div>
<div id="issue-389">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/wavernn.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/models/wavernn.py</a><br>
<b>Line number: </b>550<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
546 state = load_fsspec(checkpoint_path, map_location=torch.device(&quot;cpu&quot;), cache=cache)
547 self.load_state_dict(state[&quot;model&quot;])
548 if eval:
549 self.eval()
550 assert not self.training
551
552 def train_step(self, batch: Dict, criterion: Dict) -&gt; Tuple[Dict, Dict]:
553 mels = batch[&quot;input&quot;]
</pre>
</div>
</div>
</div>
<div id="issue-390">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py</a><br>
<b>Line number: </b>10<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
6 from torch.distributions.normal import Normal
7
8
9 def gaussian_loss(y_hat, y, log_std_min=-7.0):
10 assert y_hat.dim() == 3
11 assert y_hat.size(2) == 2
12 mean = y_hat[:, :, :1]
13 log_std = torch.clamp(y_hat[:, :, 1:], min=log_std_min)
</pre>
</div>
</div>
</div>
<div id="issue-391">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py</a><br>
<b>Line number: </b>11<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
7
8
9 def gaussian_loss(y_hat, y, log_std_min=-7.0):
10 assert y_hat.dim() == 3
11 assert y_hat.size(2) == 2
12 mean = y_hat[:, :, :1]
13 log_std = torch.clamp(y_hat[:, :, 1:], min=log_std_min)
14 # TODO: replace with pytorch dist
</pre>
</div>
</div>
</div>
<div id="issue-392">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
16 return log_probs.squeeze().mean()
17
18
19 def sample_from_gaussian(y_hat, log_std_min=-7.0, scale_factor=1.0):
20 assert y_hat.size(2) == 2
21 mean = y_hat[:, :, :1]
22 log_std = torch.clamp(y_hat[:, :, 1:], min=log_std_min)
23 dist = Normal(
</pre>
</div>
</div>
</div>
<div id="issue-393">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py</a><br>
<b>Line number: </b>47<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
43 def discretized_mix_logistic_loss(y_hat, y, num_classes=65536, log_scale_min=None, reduce=True):
44 if log_scale_min is None:
45 log_scale_min = float(np.log(1e-14))
46 y_hat = y_hat.permute(0, 2, 1)
47 assert y_hat.dim() == 3
48 assert y_hat.size(1) % 3 == 0
49 nr_mix = y_hat.size(1) // 3
50
</pre>
</div>
</div>
</div>
<div id="issue-394">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py</a><br>
<b>Line number: </b>48<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
44 if log_scale_min is None:
45 log_scale_min = float(np.log(1e-14))
46 y_hat = y_hat.permute(0, 2, 1)
47 assert y_hat.dim() == 3
48 assert y_hat.size(1) % 3 == 0
49 nr_mix = y_hat.size(1) // 3
50
51 # (B x T x C)
</pre>
</div>
</div>
</div>
<div id="issue-395">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/TTS/vocoder/utils/distribution.py</a><br>
<b>Line number: </b>123<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
119 Tensor: sample in range of [-1, 1].
120 &quot;&quot;&quot;
121 if log_scale_min is None:
122 log_scale_min = float(np.log(1e-14))
123 assert y.size(1) % 3 == 0
124 nr_mix = y.size(1) // 3
125
126 # B x T x C
</pre>
</div>
</div>
</div>
<div id="issue-396">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/audio_playback.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/audio_playback.py</a><br>
<b>Line number: </b>8<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
4 import time
5 import folder_paths
6 from scipy.io import wavfile
7 from scipy.io.wavfile import write
8 import subprocess
9 import sounddevice
10 import numpy as np
11 import torchaudio
</pre>
</div>
</div>
</div>
<div id="issue-397">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/__init__.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/__init__.py</a><br>
<b>Line number: </b>2<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import os
2 import subprocess
3
4 class DeepFuze:
5 def __init__(self):
6 self.video_path = &quot;&quot;
7 self.audio_path = &quot;&quot;
8 self.output_path = &quot;&quot;
</pre>
</div>
</div>
</div>
<div id="issue-398">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/__init__.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/__init__.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
56 if device==&quot;cuda&quot;:
57 command.extend([&#x27;--execution-providers&#x27;,&quot;cuda&quot;])
58 elif device==&quot;mps&quot;:
59 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
60 result = subprocess.run(command,stdout=subprocess.PIPE)
61 print(&quot;Output:&quot;, result.stdout)
62 print(&quot;Errors:&quot;, result.stderr)
63 print(f&quot;Lipsynced video saved at {output_path}&quot;)
</pre>
</div>
</div>
</div>
<div id="issue-399">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py</a><br>
<b>Line number: </b>2<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import os
2 import subprocess
3 import ssl
4 import urllib.request
5 from typing import List
6 from functools import lru_cache
7 from tqdm import tqdm
8
</pre>
</div>
</div>
</div>
<div id="issue-400">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py</a><br>
<b>Line number: </b>26<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
22 initial_size = get_file_size(download_file_path)
23 download_size = get_download_size(url)
24 if initial_size &lt; download_size:
25 with tqdm(total = download_size, initial = initial_size, desc = wording.get(&#x27;downloading&#x27;), unit = &#x27;B&#x27;, unit_scale = True, unit_divisor = 1024, ascii = &#x27; =&#x27;, disable = deepfuze.globals.log_level in [ &#x27;warn&#x27;, &#x27;error&#x27; ]) as progress:
26 subprocess.Popen([ &#x27;curl&#x27;, &#x27;--create-dirs&#x27;, &#x27;--silent&#x27;, &#x27;--insecure&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, download_file_path, url ])
27 current_size = initial_size
28 while current_size &lt; download_size:
29 if is_file(download_file_path):
</pre>
</div>
</div>
</div>
<div id="issue-401">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py</a><br>
<b>Line number: </b>26<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
22 initial_size = get_file_size(download_file_path)
23 download_size = get_download_size(url)
24 if initial_size &lt; download_size:
25 with tqdm(total = download_size, initial = initial_size, desc = wording.get(&#x27;downloading&#x27;), unit = &#x27;B&#x27;, unit_scale = True, unit_divisor = 1024, ascii = &#x27; =&#x27;, disable = deepfuze.globals.log_level in [ &#x27;warn&#x27;, &#x27;error&#x27; ]) as progress:
26 subprocess.Popen([ &#x27;curl&#x27;, &#x27;--create-dirs&#x27;, &#x27;--silent&#x27;, &#x27;--insecure&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, download_file_path, url ])
27 current_size = initial_size
28 while current_size &lt; download_size:
29 if is_file(download_file_path):
</pre>
</div>
</div>
</div>
<div id="issue-402">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.<br>
<b>Test ID:</b> B310<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/22.html" target="_blank">CWE-22</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/download.py</a><br>
<b>Line number: </b>40<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen</a><br>
<div class="code">
<pre>
36
37 @lru_cache(maxsize = None)
38 def get_download_size(url : str) -&gt; int:
39 try:
40 response = urllib.request.urlopen(url, timeout = 10)
41 return int(response.getheader(&#x27;Content-Length&#x27;))
42 except (OSError, ValueError):
43 return 0
</pre>
</div>
</div>
</div>
<div id="issue-403">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py</a><br>
<b>Line number: </b>3<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 from typing import List, Any
2 from functools import lru_cache
3 import subprocess
4 import xml.etree.ElementTree as ElementTree
5 import onnxruntime
6
7 from deepfuze.typing import ExecutionDevice, ValueAndUnit
8
</pre>
</div>
</div>
</div>
<div id="issue-404">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Using xml.etree.ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.<br>
<b>Test ID:</b> B405<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/20.html" target="_blank">CWE-20</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py</a><br>
<b>Line number: </b>4<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b405-import-xml-etree" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b405-import-xml-etree</a><br>
<div class="code">
<pre>
1 from typing import List, Any
2 from functools import lru_cache
3 import subprocess
4 import xml.etree.ElementTree as ElementTree
5 import onnxruntime
6
7 from deepfuze.typing import ExecutionDevice, ValueAndUnit
8
</pre>
</div>
</div>
</div>
<div id="issue-405">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
56
57
58 def run_nvidia_smi() -&gt; subprocess.Popen[bytes]:
59 commands = [ &#x27;nvidia-smi&#x27;, &#x27;--query&#x27;, &#x27;--xml-format&#x27; ]
60 return subprocess.Popen(commands, stdout = subprocess.PIPE)
61
62
63 @lru_cache(maxsize = None)
</pre>
</div>
</div>
</div>
<div id="issue-406">
<div class="issue-block issue-sev-medium">
<b>blacklist: </b> Using xml.etree.ElementTree.fromstring to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.fromstring with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called<br>
<b>Test ID:</b> B314<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/20.html" target="_blank">CWE-20</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/execution.py</a><br>
<b>Line number: </b>72<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b313-b320-xml-bad-elementtree" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b313-b320-xml-bad-elementtree</a><br>
<div class="code">
<pre>
68 def detect_execution_devices() -&gt; List[ExecutionDevice]:
69 execution_devices : List[ExecutionDevice] = []
70 try:
71 output, _ = run_nvidia_smi().communicate()
72 root_element = ElementTree.fromstring(output)
73 except Exception:
74 root_element = ElementTree.Element(&#x27;xml&#x27;)
75
</pre>
</div>
</div>
</div>
<div id="issue-407">
<div class="issue-block issue-sev-high">
<b>hashlib: </b> Use of weak SHA1 hash for security. Consider usedforsecurity=False<br>
<b>Test ID:</b> B324<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/327.html" target="_blank">CWE-327</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/face_store.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/face_store.py</a><br>
<b>Line number: </b>32<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html</a><br>
<div class="code">
<pre>
28 FACE_STORE[&#x27;static_faces&#x27;] = {}
29
30
31 def create_frame_hash(vision_frame : VisionFrame) -&gt; Optional[str]:
32 return hashlib.sha1(vision_frame.tobytes()).hexdigest() if numpy.any(vision_frame) else None
33
34
35 def get_reference_faces() -&gt; Optional[FaceSet]:
</pre>
</div>
</div>
</div>
<div id="issue-408">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/ffmpeg.py</a><br>
<b>Line number: </b>3<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 from typing import List, Optional
2 import os
3 import subprocess
4 import filetype
5
6 import deepfuze.globals
7 from deepfuze import logger, process_manager
8 from deepfuze.typing import OutputVideoPreset, Fps, AudioBuffer
</pre>
</div>
</div>
</div>
<div id="issue-409">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/ffmpeg.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
12
13 def run_ffmpeg(args : List[str]) -&gt; bool:
14 commands = [ &#x27;ffmpeg&#x27;, &#x27;-hide_banner&#x27;, &#x27;-loglevel&#x27;, &#x27;error&#x27; ]
15 commands.extend(args)
16 process = subprocess.Popen(commands, stderr = subprocess.PIPE, stdout = subprocess.PIPE)
17
18 while process_manager.is_processing():
19 try:
</pre>
</div>
</div>
</div>
<div id="issue-410">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/ffmpeg.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
27
28 def open_ffmpeg(args : List[str]) -&gt; subprocess.Popen[bytes]:
29 commands = [ &#x27;ffmpeg&#x27;, &#x27;-hide_banner&#x27;, &#x27;-loglevel&#x27;, &#x27;quiet&#x27; ]
30 commands.extend(args)
31 return subprocess.Popen(commands, stdin = subprocess.PIPE, stdout = subprocess.PIPE)
32
33
34 def log_debug(process : subprocess.Popen[bytes]) -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-411">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>5<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 from typing import Dict, Tuple
2 import sys
3 import os
4 import tempfile
5 import subprocess
6 import inquirer
7 from argparse import ArgumentParser, HelpFormatter
8
</pre>
</div>
</div>
</div>
<div id="issue-412">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
56 if answers:
57 onnxruntime = answers[&#x27;onnxruntime&#x27;]
58 onnxruntime_name, onnxruntime_version = ONNXRUNTIMES[onnxruntime]
59
60 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, &#x27;-r&#x27;, &#x27;requirements.txt&#x27;, &#x27;--force-reinstall&#x27; ])
61 if onnxruntime == &#x27;rocm-5.4.2&#x27; or onnxruntime == &#x27;rocm-5.6&#x27;:
62 if python_id in [ &#x27;cp39&#x27;, &#x27;cp310&#x27;, &#x27;cp311&#x27; ]:
63 rocm_version = onnxruntime.replace(&#x27;-&#x27;, &#x27;&#x27;)
</pre>
</div>
</div>
</div>
<div id="issue-413">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
56 if answers:
57 onnxruntime = answers[&#x27;onnxruntime&#x27;]
58 onnxruntime_name, onnxruntime_version = ONNXRUNTIMES[onnxruntime]
59
60 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, &#x27;-r&#x27;, &#x27;requirements.txt&#x27;, &#x27;--force-reinstall&#x27; ])
61 if onnxruntime == &#x27;rocm-5.4.2&#x27; or onnxruntime == &#x27;rocm-5.6&#x27;:
62 if python_id in [ &#x27;cp39&#x27;, &#x27;cp310&#x27;, &#x27;cp311&#x27; ]:
63 rocm_version = onnxruntime.replace(&#x27;-&#x27;, &#x27;&#x27;)
</pre>
</div>
</div>
</div>
<div id="issue-414">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>68<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
64 rocm_version = rocm_version.replace(&#x27;.&#x27;, &#x27;&#x27;)
65 wheel_name = &#x27;onnxruntime_training-&#x27; + onnxruntime_version + &#x27;+&#x27; + rocm_version + &#x27;-&#x27; + python_id + &#x27;-&#x27; + python_id + &#x27;-manylinux_2_17_x86_64.manylinux2014_x86_64.whl&#x27;
66 wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
67 wheel_url = &#x27;https://download.onnxruntime.ai/&#x27; + wheel_name
68 subprocess.call([ &#x27;curl&#x27;, &#x27;--silent&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, wheel_path, wheel_url ])
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
</pre>
</div>
</div>
</div>
<div id="issue-415">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>68<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
64 rocm_version = rocm_version.replace(&#x27;.&#x27;, &#x27;&#x27;)
65 wheel_name = &#x27;onnxruntime_training-&#x27; + onnxruntime_version + &#x27;+&#x27; + rocm_version + &#x27;-&#x27; + python_id + &#x27;-&#x27; + python_id + &#x27;-manylinux_2_17_x86_64.manylinux2014_x86_64.whl&#x27;
66 wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
67 wheel_url = &#x27;https://download.onnxruntime.ai/&#x27; + wheel_name
68 subprocess.call([ &#x27;curl&#x27;, &#x27;--silent&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, wheel_path, wheel_url ])
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
</pre>
</div>
</div>
</div>
<div id="issue-416">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>69<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
65 wheel_name = &#x27;onnxruntime_training-&#x27; + onnxruntime_version + &#x27;+&#x27; + rocm_version + &#x27;-&#x27; + python_id + &#x27;-&#x27; + python_id + &#x27;-manylinux_2_17_x86_64.manylinux2014_x86_64.whl&#x27;
66 wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
67 wheel_url = &#x27;https://download.onnxruntime.ai/&#x27; + wheel_name
68 subprocess.call([ &#x27;curl&#x27;, &#x27;--silent&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, wheel_path, wheel_url ])
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
72 else:
</pre>
</div>
</div>
</div>
<div id="issue-417">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>69<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
65 wheel_name = &#x27;onnxruntime_training-&#x27; + onnxruntime_version + &#x27;+&#x27; + rocm_version + &#x27;-&#x27; + python_id + &#x27;-&#x27; + python_id + &#x27;-manylinux_2_17_x86_64.manylinux2014_x86_64.whl&#x27;
66 wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
67 wheel_url = &#x27;https://download.onnxruntime.ai/&#x27; + wheel_name
68 subprocess.call([ &#x27;curl&#x27;, &#x27;--silent&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, wheel_path, wheel_url ])
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
72 else:
</pre>
</div>
</div>
</div>
<div id="issue-418">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>70<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
66 wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
67 wheel_url = &#x27;https://download.onnxruntime.ai/&#x27; + wheel_name
68 subprocess.call([ &#x27;curl&#x27;, &#x27;--silent&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, wheel_path, wheel_url ])
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
72 else:
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-419">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>70<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
66 wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
67 wheel_url = &#x27;https://download.onnxruntime.ai/&#x27; + wheel_name
68 subprocess.call([ &#x27;curl&#x27;, &#x27;--silent&#x27;, &#x27;--location&#x27;, &#x27;--continue-at&#x27;, &#x27;-&#x27;, &#x27;--output&#x27;, wheel_path, wheel_url ])
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
72 else:
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-420">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>73<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
72 else:
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
74 if onnxruntime == &#x27;cuda-12.2&#x27;:
75 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--extra-index-url&#x27;, &#x27;https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple&#x27;, &#x27;--force-reinstall&#x27; ])
76 else:
</pre>
</div>
</div>
</div>
<div id="issue-421">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>73<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
69 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, wheel_path, &#x27;-y&#x27;, &#x27;-q&#x27; ])
70 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, wheel_path, &#x27;--force-reinstall&#x27; ])
71 os.remove(wheel_path)
72 else:
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
74 if onnxruntime == &#x27;cuda-12.2&#x27;:
75 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--extra-index-url&#x27;, &#x27;https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple&#x27;, &#x27;--force-reinstall&#x27; ])
76 else:
</pre>
</div>
</div>
</div>
<div id="issue-422">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>75<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
71 os.remove(wheel_path)
72 else:
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
74 if onnxruntime == &#x27;cuda-12.2&#x27;:
75 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--extra-index-url&#x27;, &#x27;https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple&#x27;, &#x27;--force-reinstall&#x27; ])
76 else:
77 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--force-reinstall&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-423">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>75<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
71 os.remove(wheel_path)
72 else:
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
74 if onnxruntime == &#x27;cuda-12.2&#x27;:
75 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--extra-index-url&#x27;, &#x27;https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple&#x27;, &#x27;--force-reinstall&#x27; ])
76 else:
77 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--force-reinstall&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-424">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>77<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
74 if onnxruntime == &#x27;cuda-12.2&#x27;:
75 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--extra-index-url&#x27;, &#x27;https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple&#x27;, &#x27;--force-reinstall&#x27; ])
76 else:
77 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--force-reinstall&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-425">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/installer.py</a><br>
<b>Line number: </b>77<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
73 subprocess.call([ &#x27;pip&#x27;, &#x27;uninstall&#x27;, &#x27;onnxruntime&#x27;, onnxruntime_name, &#x27;-y&#x27;, &#x27;-q&#x27; ])
74 if onnxruntime == &#x27;cuda-12.2&#x27;:
75 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--extra-index-url&#x27;, &#x27;https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple&#x27;, &#x27;--force-reinstall&#x27; ])
76 else:
77 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, onnxruntime_name + &#x27;==&#x27; + onnxruntime_version, &#x27;--force-reinstall&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-426">
<div class="issue-block issue-sev-high">
<b>hashlib: </b> Use of weak SHA1 hash for security. Consider usedforsecurity=False<br>
<b>Test ID:</b> B324<br>
<b>Severity: </b>HIGH<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/327.html" target="_blank">CWE-327</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/normalizer.py</a><br>
<b>Line number: </b>14<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html</a><br>
<div class="code">
<pre>
10 def normalize_output_path(target_path : Optional[str], output_path : Optional[str]) -&gt; Optional[str]:
11 if target_path and output_path:
12 target_name, target_extension = os.path.splitext(os.path.basename(target_path))
13 if is_directory(output_path):
14 output_hash = hashlib.sha1(str(deepfuze.globals.__dict__).encode(&#x27;utf-8&#x27;)).hexdigest()[:8]
15 output_name = target_name + &#x27;-&#x27; + output_hash
16 return os.path.join(output_path, output_name + target_extension)
17 output_name, output_extension = os.path.splitext(os.path.basename(output_path))
</pre>
</div>
</div>
</div>
<div id="issue-427">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/uis/components/webcam.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/deepfuze/uis/components/webcam.py</a><br>
<b>Line number: </b>3<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 from typing import Optional, Generator, Deque
2 import os
3 import subprocess
4 import cv2
5 import gradio
6 from time import sleep
7 from concurrent.futures import ThreadPoolExecutor
8 from collections import deque
</pre>
</div>
</div>
</div>
<div id="issue-428">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/install.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/install.py</a><br>
<b>Line number: </b>4<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 #!/usr/bin/env python3
2
3 import os
4 import subprocess
5
6 os.environ[&#x27;PIP_BREAK_SYSTEM_PACKAGES&#x27;] = &#x27;1&#x27;
7 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, &#x27;inquirer&#x27;, &#x27;-q&#x27; ])
8
</pre>
</div>
</div>
</div>
<div id="issue-429">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/install.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/install.py</a><br>
<b>Line number: </b>7<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
3 import os
4 import subprocess
5
6 os.environ[&#x27;PIP_BREAK_SYSTEM_PACKAGES&#x27;] = &#x27;1&#x27;
7 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, &#x27;inquirer&#x27;, &#x27;-q&#x27; ])
8
9 from deepfuze import installer
10
</pre>
</div>
</div>
</div>
<div id="issue-430">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/install.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/install.py</a><br>
<b>Line number: </b>7<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
3 import os
4 import subprocess
5
6 os.environ[&#x27;PIP_BREAK_SYSTEM_PACKAGES&#x27;] = &#x27;1&#x27;
7 subprocess.call([ &#x27;pip&#x27;, &#x27;install&#x27;, &#x27;inquirer&#x27;, &#x27;-q&#x27; ])
8
9 from deepfuze import installer
10
</pre>
</div>
</div>
</div>
<div id="issue-431">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>4<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import os
2 import sys
3 import json
4 import subprocess
5 import numpy as np
6 import re
7 import cv2
8 import time
</pre>
</div>
</div>
</div>
<div id="issue-432">
<div class="issue-block issue-sev-low">
<b>try_except_pass: </b> Try, Except, Pass detected.<br>
<b>Test ID:</b> B110<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>38<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html</a><br>
<div class="code">
<pre>
34 audio_dir = os.path.join(folder_paths.get_input_directory(),&quot;audio&quot;)
35
36 try:
37 os.makedirs(result_dir)
38 except: pass
39 try:
40 os.makedirs(audio_dir)
41 except: pass
</pre>
</div>
</div>
</div>
<div id="issue-433">
<div class="issue-block issue-sev-low">
<b>try_except_pass: </b> Try, Except, Pass detected.<br>
<b>Test ID:</b> B110<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>41<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html</a><br>
<div class="code">
<pre>
37 os.makedirs(result_dir)
38 except: pass
39 try:
40 os.makedirs(audio_dir)
41 except: pass
42 audio_extensions = [&#x27;mp3&#x27;, &#x27;mp4&#x27;, &#x27;wav&#x27;, &#x27;ogg&#x27;]
43
44
</pre>
</div>
</div>
</div>
<div id="issue-434">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>211<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
207 with open(video_format_path, &#x27;r&#x27;) as stream:
208 video_format = json.load(stream)
209 for w in gen_format_widgets(video_format):
210 print(w[0][0])
211 assert(w[0][0] in kwargs)
212 if len(w[0]) &gt; 3:
213 w[0] = Template(w[0][3]).substitute(val=kwargs[w[0][0]])
214 else:
</pre>
</div>
</div>
</div>
<div id="issue-435">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>247<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
243 with open(metadata_path, &quot;w&quot;) as f:
244 f.write(&quot;;FFMETADATA1\n&quot;)
245 f.write(metadata)
246 m_args = args[:1] + [&quot;-i&quot;, metadata_path] + args[1:] + [&quot;-metadata&quot;, &quot;creation_time=now&quot;]
247 with subprocess.Popen(m_args + [file_path], stderr=subprocess.PIPE,
248 stdin=subprocess.PIPE, env=env) as proc:
249 try:
250 while frame_data is not None:
251 proc.stdin.write(frame_data)
</pre>
</div>
</div>
</div>
<div id="issue-436">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>270<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
266 #Res was not set
267 print(err.decode(&quot;utf-8&quot;), end=&quot;&quot;, file=sys.stderr)
268 print(&quot;An error occurred when saving with metadata&quot;)
269 if res != b&#x27;&#x27;:
270 with subprocess.Popen(args + [file_path], stderr=subprocess.PIPE,
271 stdin=subprocess.PIPE, env=env) as proc:
272 try:
273 while frame_data is not None:
274 proc.stdin.write(frame_data)
</pre>
</div>
</div>
</div>
<div id="issue-437">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>290<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
286 print(res.decode(&quot;utf-8&quot;), end=&quot;&quot;, file=sys.stderr)
287
288 def gifski_process(args, video_format, file_path, env):
289 frame_data = yield
290 with subprocess.Popen(args + video_format[&#x27;main_pass&#x27;] + [&#x27;-f&#x27;, &#x27;yuv4mpegpipe&#x27;, &#x27;-&#x27;],
291 stderr=subprocess.PIPE, stdin=subprocess.PIPE,
292 stdout=subprocess.PIPE, env=env) as procff:
293 with subprocess.Popen([gifski_path] + video_format[&#x27;gifski_pass&#x27;]
294 + [&#x27;-q&#x27;, &#x27;-o&#x27;, file_path, &#x27;-&#x27;], stderr=subprocess.PIPE,
295 stdin=procff.stdout, stdout=subprocess.PIPE,
</pre>
</div>
</div>
</div>
<div id="issue-438">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>293<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
289 frame_data = yield
290 with subprocess.Popen(args + video_format[&#x27;main_pass&#x27;] + [&#x27;-f&#x27;, &#x27;yuv4mpegpipe&#x27;, &#x27;-&#x27;],
291 stderr=subprocess.PIPE, stdin=subprocess.PIPE,
292 stdout=subprocess.PIPE, env=env) as procff:
293 with subprocess.Popen([gifski_path] + video_format[&#x27;gifski_pass&#x27;]
294 + [&#x27;-q&#x27;, &#x27;-o&#x27;, file_path, &#x27;-&#x27;], stderr=subprocess.PIPE,
295 stdin=procff.stdout, stdout=subprocess.PIPE,
296 env=env) as procgs:
297 try:
298 while frame_data is not None:
299 procff.stdin.write(frame_data)
</pre>
</div>
</div>
</div>
<div id="issue-439">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>781<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
777 images = [b&#x27;&#x27;.join(images)]
778 os.makedirs(folder_paths.get_temp_directory(), exist_ok=True)
779 pre_pass_args = args[:13] + video_format[&#x27;pre_pass&#x27;]
780 try:
781 subprocess.run(pre_pass_args, input=images[0], env=env,
782 capture_output=True, check=True)
783 except subprocess.CalledProcessError as e:
784 raise Exception(&quot;An error occurred in the ffmpeg prepass:\n&quot; \
785 + e.stderr.decode(&quot;utf-8&quot;))
</pre>
</div>
</div>
</div>
<div id="issue-440">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>864<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
860 elif device==&quot;mps&quot;:
861 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
862 print(command)
863 if platform == &quot;win32&quot;:
864 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
865 else:
866 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
867 # audio_file = os.path.join(audio_dir,str(time.time()).replace(&quot;.&quot;,&quot;&quot;)+&quot;.wav&quot;)
</pre>
</div>
</div>
</div>
<div id="issue-441">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>866<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
862 print(command)
863 if platform == &quot;win32&quot;:
864 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
865 else:
866 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
867 # audio_file = os.path.join(audio_dir,str(time.time()).replace(&quot;.&quot;,&quot;&quot;)+&quot;.wav&quot;)
868 # subprocess.run([&quot;ffmpeg&quot;,&quot;-i&quot;,faceswap_filename, audio_file, &#x27;-y&#x27;])
869 # ffmpeg -i sample.avi -q:a 0 -map a sample.mp3
</pre>
</div>
</div>
</div>
<div id="issue-442">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>891<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
887 elif device==&quot;mps&quot;:
888 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
889 print(command)
890 if platform == &quot;win32&quot;:
891 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
892 else:
893 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
894
</pre>
</div>
</div>
</div>
<div id="issue-443">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>893<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
889 print(command)
890 if platform == &quot;win32&quot;:
891 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
892 else:
893 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
894
895 if frame_enhancer!=&quot;None&quot;:
896 command = [
</pre>
</div>
</div>
</div>
<div id="issue-444">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>915<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
911 command.extend([&#x27;--execution-providers&#x27;,&quot;cuda&quot;])
912 elif device==&quot;mps&quot;:
913 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
914 if platform == &quot;win32&quot;:
915 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
916 else:
917 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
918 # temp_file = &quot;/&quot;.join(faceswap_filename.split(&quot;/&quot;)[:-1]) + &quot;_&quot;+faceswap_filename.split(&quot;/&quot;)[-1]
</pre>
</div>
</div>
</div>
<div id="issue-445">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>917<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
913 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
914 if platform == &quot;win32&quot;:
915 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
916 else:
917 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
918 # temp_file = &quot;/&quot;.join(faceswap_filename.split(&quot;/&quot;)[:-1]) + &quot;_&quot;+faceswap_filename.split(&quot;/&quot;)[-1]
919 # subprocess.run([&quot;ffmpeg&quot;,&quot;-i&quot;,faceswap_filename,&quot;-i&quot;,audio_file,&quot;-c&quot;,&quot;copy&quot;,&quot;-map&quot;,&quot;0:v:0&quot;,&quot;-map&quot;,&quot;1:a:0&quot;,temp_file,&#x27;-y&#x27;])
920 # faceswap_filename = temp_file
</pre>
</div>
</div>
</div>
<div id="issue-446">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>926<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
922 print(result.stderr)
923 if audio:
924 audio_file = os.path.join(audio_dir,str(time.time()).replace(&quot;.&quot;,&quot;&quot;)+&quot;.wav&quot;)
925 torchaudio.save(audio_file,audio[&quot;waveform&quot;][0],audio[&quot;sample_rate&quot;])
926 subprocess.run(f&quot;ffmpeg -i {faceswap_filename} -i {audio_file} -c copy {faceswap_filename.replace(&#x27;.mp4&#x27;,&#x27;_.mp4&#x27;)} -y&quot;.split())
927 return load_video_cv(faceswap_filename.replace(&#x27;.mp4&#x27;,&#x27;_.mp4&#x27;),0,&#x27;Disabled&#x27;,512,512,0,0,1)
928 return load_video_cv(faceswap_filename,0,&#x27;Disabled&#x27;,512,512,0,0,1)
929
</pre>
</div>
</div>
</div>
<div id="issue-447">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1200<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1196 images = [b&#x27;&#x27;.join(images)]
1197 os.makedirs(folder_paths.get_temp_directory(), exist_ok=True)
1198 pre_pass_args = args[:13] + video_format[&#x27;pre_pass&#x27;]
1199 try:
1200 subprocess.run(pre_pass_args, input=images[0], env=env,
1201 capture_output=True, check=True)
1202 except subprocess.CalledProcessError as e:
1203 raise Exception(&quot;An error occurred in the ffmpeg prepass:\n&quot; \
1204 + e.stderr.decode(&quot;utf-8&quot;))
</pre>
</div>
</div>
</div>
<div id="issue-448">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1275<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1271 elif device==&quot;mps&quot;:
1272 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
1273 print(command)
1274 if platform == &quot;win32&quot;:
1275 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1276 else:
1277 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1278 # print(result.stdout.splitlines()[-1])
</pre>
</div>
</div>
</div>
<div id="issue-449">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1277<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1273 print(command)
1274 if platform == &quot;win32&quot;:
1275 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1276 else:
1277 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1278 # print(result.stdout.splitlines()[-1])
1279 if enhancer!=&quot;None&quot;:
1280 command = [
</pre>
</div>
</div>
</div>
<div id="issue-450">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1299<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1295 elif device==&quot;mps&quot;:
1296 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
1297 print(command)
1298 if platform == &quot;win32&quot;:
1299 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1300 else:
1301 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1302 filename = enhanced_filename
</pre>
</div>
</div>
</div>
<div id="issue-451">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1301<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1297 print(command)
1298 if platform == &quot;win32&quot;:
1299 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1300 else:
1301 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1302 filename = enhanced_filename
1303
1304 if frame_enhancer!=&quot;None&quot;:
</pre>
</div>
</div>
</div>
<div id="issue-452">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1324<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1320 command.extend([&#x27;--execution-providers&#x27;,&quot;cuda&quot;])
1321 elif device==&quot;mps&quot;:
1322 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
1323 if platform == &quot;win32&quot;:
1324 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1325 else:
1326 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1327 temp_file = enhanced_filename.replace(&quot;.mp4&quot;,&quot;_.mp4&quot;) # &quot;/&quot;.join(enhanced_filename.split(&quot;/&quot;)[:-1]) + &quot;_&quot;+enhanced_filename.split(&quot;/&quot;)[-1]
</pre>
</div>
</div>
</div>
<div id="issue-453">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1326<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1322 command.extend([&#x27;--execution-providers&#x27;,&quot;coreml&quot;])
1323 if platform == &quot;win32&quot;:
1324 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1325 else:
1326 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1327 temp_file = enhanced_filename.replace(&quot;.mp4&quot;,&quot;_.mp4&quot;) # &quot;/&quot;.join(enhanced_filename.split(&quot;/&quot;)[:-1]) + &quot;_&quot;+enhanced_filename.split(&quot;/&quot;)[-1]
1328 subprocess.run([&quot;ffmpeg&quot;,&quot;-i&quot;,enhanced_filename,&quot;-i&quot;,audio_file,&quot;-c&quot;,&quot;copy&quot;,&quot;-map&quot;,&quot;0:v:0&quot;,&quot;-map&quot;,&quot;1:a:0&quot;,temp_file,&#x27;-y&#x27;])
1329 filename = temp_file
</pre>
</div>
</div>
</div>
<div id="issue-454">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1328<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
1324 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1325 else:
1326 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1327 temp_file = enhanced_filename.replace(&quot;.mp4&quot;,&quot;_.mp4&quot;) # &quot;/&quot;.join(enhanced_filename.split(&quot;/&quot;)[:-1]) + &quot;_&quot;+enhanced_filename.split(&quot;/&quot;)[-1]
1328 subprocess.run([&quot;ffmpeg&quot;,&quot;-i&quot;,enhanced_filename,&quot;-i&quot;,audio_file,&quot;-c&quot;,&quot;copy&quot;,&quot;-map&quot;,&quot;0:v:0&quot;,&quot;-map&quot;,&quot;1:a:0&quot;,temp_file,&#x27;-y&#x27;])
1329 filename = temp_file
1330
1331 print(result.stderr)
</pre>
</div>
</div>
</div>
<div id="issue-455">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1328<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1324 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1325 else:
1326 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1327 temp_file = enhanced_filename.replace(&quot;.mp4&quot;,&quot;_.mp4&quot;) # &quot;/&quot;.join(enhanced_filename.split(&quot;/&quot;)[:-1]) + &quot;_&quot;+enhanced_filename.split(&quot;/&quot;)[-1]
1328 subprocess.run([&quot;ffmpeg&quot;,&quot;-i&quot;,enhanced_filename,&quot;-i&quot;,audio_file,&quot;-c&quot;,&quot;copy&quot;,&quot;-map&quot;,&quot;0:v:0&quot;,&quot;-map&quot;,&quot;1:a:0&quot;,temp_file,&#x27;-y&#x27;])
1329 filename = temp_file
1330
1331 print(result.stderr)
</pre>
</div>
</div>
</div>
<div id="issue-456">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1431<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1427 &#x27;--output_file&#x27;, file_path,
1428 &#x27;--device&#x27;, device
1429 ]
1430 if platform == &quot;win32&quot;:
1431 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1432 else:
1433 result = subprocess.run(command, cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,capture_output=True, text=True)
1434
</pre>
</div>
</div>
</div>
<div id="issue-457">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1433<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1429 ]
1430 if platform == &quot;win32&quot;:
1431 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1432 else:
1433 result = subprocess.run(command, cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,capture_output=True, text=True)
1434
1435 print(&quot;stdout:&quot;, result.stdout)
1436 print(&quot;stderr:&quot;, result.stderr)
</pre>
</div>
</div>
</div>
<div id="issue-458">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1498<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1494 &#x27;--headless&#x27;
1495 ]
1496 print(command)
1497 if platform == &quot;win32&quot;:
1498 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1499 else:
1500 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1501 print(result.stdout)
</pre>
</div>
</div>
</div>
<div id="issue-459">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/nodes.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/nodes.py</a><br>
<b>Line number: </b>1500<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
1496 print(command)
1497 if platform == &quot;win32&quot;:
1498 result = subprocess.run(command,cwd=&quot;Hanzo Studio/custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1499 else:
1500 result = subprocess.run(command,cwd=&quot;custom_nodes/Hanzo Studio-DeepFuze&quot;,stdout=subprocess.PIPE)
1501 print(result.stdout)
1502 results.append({
1503 &quot;filename&quot;: &quot;_&quot;+file,
</pre>
</div>
</div>
</div>
<div id="issue-460">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import pytest
3
4 from deepfuze.audio import get_audio_frame, read_static_audio
5 from deepfuze.download import conditional_download
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-461">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>14<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
10 conditional_download(&#x27;../../models/facefusion/examples&#x27;,
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;
13 ])
14 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
15
16
17 def test_get_audio_frame() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-462">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>14<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
10 conditional_download(&#x27;../../models/facefusion/examples&#x27;,
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;
13 ])
14 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
15
16
17 def test_get_audio_frame() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-463">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>18<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
14 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
15
16
17 def test_get_audio_frame() -&gt; None:
18 assert get_audio_frame(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 25) is not None
19 assert get_audio_frame(&#x27;../../models/facefusion/examples/source.wav&#x27;, 25) is not None
20 assert get_audio_frame(&#x27;invalid&#x27;, 25) is None
21
</pre>
</div>
</div>
</div>
<div id="issue-464">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
15
16
17 def test_get_audio_frame() -&gt; None:
18 assert get_audio_frame(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 25) is not None
19 assert get_audio_frame(&#x27;../../models/facefusion/examples/source.wav&#x27;, 25) is not None
20 assert get_audio_frame(&#x27;invalid&#x27;, 25) is None
21
22
</pre>
</div>
</div>
</div>
<div id="issue-465">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
16
17 def test_get_audio_frame() -&gt; None:
18 assert get_audio_frame(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 25) is not None
19 assert get_audio_frame(&#x27;../../models/facefusion/examples/source.wav&#x27;, 25) is not None
20 assert get_audio_frame(&#x27;invalid&#x27;, 25) is None
21
22
23 def test_read_static_audio() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-466">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
20 assert get_audio_frame(&#x27;invalid&#x27;, 25) is None
21
22
23 def test_read_static_audio() -&gt; None:
24 assert len(read_static_audio(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 25)) == 280
25 assert len(read_static_audio(&#x27;../../models/facefusion/examples/source.wav&#x27;, 25)) == 280
26 assert read_static_audio(&#x27;invalid&#x27;, 25) is None
</pre>
</div>
</div>
</div>
<div id="issue-467">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>25<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
21
22
23 def test_read_static_audio() -&gt; None:
24 assert len(read_static_audio(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 25)) == 280
25 assert len(read_static_audio(&#x27;../../models/facefusion/examples/source.wav&#x27;, 25)) == 280
26 assert read_static_audio(&#x27;invalid&#x27;, 25) is None
</pre>
</div>
</div>
</div>
<div id="issue-468">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_audio.py</a><br>
<b>Line number: </b>26<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
22
23 def test_read_static_audio() -&gt; None:
24 assert len(read_static_audio(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 25)) == 280
25 assert len(read_static_audio(&#x27;../../models/facefusion/examples/source.wav&#x27;, 25)) == 280
26 assert read_static_audio(&#x27;invalid&#x27;, 25) is None
</pre>
</div>
</div>
</div>
<div id="issue-469">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import sys
3 import pytest
4
5 from deepfuze.download import conditional_download
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-470">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_debug_face_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-471">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_debug_face_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-472">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
16
17
18 def test_debug_face_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_debugger&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_debug_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-473">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18 def test_debug_face_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_debugger&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_debug_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
</pre>
</div>
</div>
</div>
<div id="issue-474">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_debugger&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_debug_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
26 def test_debug_face_to_video() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-475">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
24
25
26 def test_debug_face_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_debugger&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_debug_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-476">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
26 def test_debug_face_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_debugger&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_debug_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-477">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_debugger.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_debugger&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_debug_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-478">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import sys
3 import pytest
4
5 from deepfuze.download import conditional_download
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-479">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_enhance_face_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-480">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_enhance_face_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-481">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
16
17
18 def test_enhance_face_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-482">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18 def test_enhance_face_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
</pre>
</div>
</div>
</div>
<div id="issue-483">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
26 def test_enhance_face_to_video() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-484">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
24
25
26 def test_enhance_face_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-485">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
26 def test_enhance_face_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
32
</pre>
</div>
</div>
</div>
<div id="issue-486">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_enhancer.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
32
</pre>
</div>
</div>
</div>
<div id="issue-487">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import sys
3 import pytest
4
5 from deepfuze.download import conditional_download
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-488">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_swap_face_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-489">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_swap_face_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-490">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
16
17
18 def test_swap_face_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_swapper&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_swap_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-491">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18 def test_swap_face_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_swapper&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_swap_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
</pre>
</div>
</div>
</div>
<div id="issue-492">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_swapper&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_swap_face_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
26 def test_swap_face_to_video() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-493">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
24
25
26 def test_swap_face_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_swapper&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_swap_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-494">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
26 def test_swap_face_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_swapper&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_swap_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-495">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_face_swapper.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;face_swapper&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_swap_face_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-496">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import sys
3 import pytest
4
5 from deepfuze.download import conditional_download
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-497">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.jpg&#x27; ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.mp4&#x27; ])
17
18
</pre>
</div>
</div>
</div>
<div id="issue-498">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.jpg&#x27; ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.mp4&#x27; ])
17
18
</pre>
</div>
</div>
</div>
<div id="issue-499">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.jpg&#x27; ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.mp4&#x27; ])
17
18
19 def test_colorize_frame_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-500">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.jpg&#x27; ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;hue=s=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.mp4&#x27; ])
17
18
19 def test_colorize_frame_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-501">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
17
18
19 def test_colorize_frame_to_image() -&gt; None:
20 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_colorizer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_colorize_frame_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
21 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
22
23 assert run.returncode == 0
24 assert &#x27;image succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-502">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 def test_colorize_frame_to_image() -&gt; None:
20 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_colorizer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_colorize_frame_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
21 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
22
23 assert run.returncode == 0
24 assert &#x27;image succeed&#x27; in run.stdout.decode()
25
26
</pre>
</div>
</div>
</div>
<div id="issue-503">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
20 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_colorizer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_colorize_frame_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
21 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
22
23 assert run.returncode == 0
24 assert &#x27;image succeed&#x27; in run.stdout.decode()
25
26
27 def test_colorize_frame_to_video() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-504">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>29<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
25
26
27 def test_colorize_frame_to_video() -&gt; None:
28 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_colorizer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_colorize_frame_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
29 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
30
31 assert run.returncode == 0
32 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-505">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 def test_colorize_frame_to_video() -&gt; None:
28 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_colorizer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_colorize_frame_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
29 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
30
31 assert run.returncode == 0
32 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-506">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_colorizer.py</a><br>
<b>Line number: </b>32<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
28 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_colorizer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p-0sat.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_colorize_frame_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
29 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
30
31 assert run.returncode == 0
32 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-507">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import sys
3 import pytest
4
5 from deepfuze.download import conditional_download
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-508">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_enhance_frame_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-509">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
11 [
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
14 ])
15 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
16
17
18 def test_enhance_frame_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-510">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
16
17
18 def test_enhance_frame_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_frame_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-511">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18 def test_enhance_frame_to_image() -&gt; None:
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_frame_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
</pre>
</div>
</div>
</div>
<div id="issue-512">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_frame_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
20 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
21
22 assert run.returncode == 0
23 assert &#x27;image succeed&#x27; in run.stdout.decode()
24
25
26 def test_enhance_frame_to_video() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-513">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
24
25
26 def test_enhance_frame_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_frame_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-514">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
26 def test_enhance_frame_to_video() -&gt; None:
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_frame_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-515">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_frame_enhancer.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;frame_enhancer&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_enhance_frame_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
28 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
29
30 assert run.returncode == 0
31 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-516">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import sys
3 import pytest
4
5 from deepfuze.download import conditional_download
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-517">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;,
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17
18
19 def test_sync_lip_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-518">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;,
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17
18
19 def test_sync_lip_to_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-519">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
17
18
19 def test_sync_lip_to_image() -&gt; None:
20 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;lip_syncer&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_sync_lip_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
21 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
22
23 assert run.returncode == 0
24 assert &#x27;image succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-520">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 def test_sync_lip_to_image() -&gt; None:
20 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;lip_syncer&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_sync_lip_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
21 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
22
23 assert run.returncode == 0
24 assert &#x27;image succeed&#x27; in run.stdout.decode()
25
26
</pre>
</div>
</div>
</div>
<div id="issue-521">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
20 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;lip_syncer&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_sync_lip_to_image.jpg&#x27;, &#x27;--headless&#x27; ]
21 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
22
23 assert run.returncode == 0
24 assert &#x27;image succeed&#x27; in run.stdout.decode()
25
26
27 def test_sync_lip_to_video() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-522">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>29<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
25
26
27 def test_sync_lip_to_video() -&gt; None:
28 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;lip_syncer&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_sync_lip_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
29 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
30
31 assert run.returncode == 0
32 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-523">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 def test_sync_lip_to_video() -&gt; None:
28 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;lip_syncer&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_sync_lip_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
29 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
30
31 assert run.returncode == 0
32 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-524">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_cli_lip_syncer.py</a><br>
<b>Line number: </b>32<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
28 commands = [ sys.executable, &#x27;run.py&#x27;, &#x27;--frame-processors&#x27;, &#x27;lip_syncer&#x27;, &#x27;-s&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;-t&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-o&#x27;, &#x27;../../models/facefusion/examples/test_sync_lip_to_video.mp4&#x27;, &#x27;--trim-frame-end&#x27;, &#x27;10&#x27;, &#x27;--headless&#x27; ]
29 run = subprocess.run(commands, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
30
31 assert run.returncode == 0
32 assert &#x27;video succeed&#x27; in run.stdout.decode()
</pre>
</div>
</div>
</div>
<div id="issue-525">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py</a><br>
<b>Line number: </b>5<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1 from deepfuze.common_helper import create_metavar, create_int_range, create_float_range
2
3
4 def test_create_metavar() -&gt; None:
5 assert create_metavar([ 1, 2, 3, 4, 5 ]) == &#x27;[1-5]&#x27;
6
7
8 def test_create_int_range() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-526">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py</a><br>
<b>Line number: </b>9<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
5 assert create_metavar([ 1, 2, 3, 4, 5 ]) == &#x27;[1-5]&#x27;
6
7
8 def test_create_int_range() -&gt; None:
9 assert create_int_range(0, 2, 1) == [ 0, 1, 2 ]
10 assert create_float_range(0, 1, 1) == [ 0, 1 ]
11
12
</pre>
</div>
</div>
</div>
<div id="issue-527">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py</a><br>
<b>Line number: </b>10<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
6
7
8 def test_create_int_range() -&gt; None:
9 assert create_int_range(0, 2, 1) == [ 0, 1, 2 ]
10 assert create_float_range(0, 1, 1) == [ 0, 1 ]
11
12
13 def test_create_float_range() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-528">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py</a><br>
<b>Line number: </b>14<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
10 assert create_float_range(0, 1, 1) == [ 0, 1 ]
11
12
13 def test_create_float_range() -&gt; None:
14 assert create_float_range(0.0, 1.0, 0.5) == [ 0.0, 0.5, 1.0 ]
15 assert create_float_range(0.0, 1.0, 0.05) == [ 0.0, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.0 ]
</pre>
</div>
</div>
</div>
<div id="issue-529">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_common_helper.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
11
12
13 def test_create_float_range() -&gt; None:
14 assert create_float_range(0.0, 1.0, 0.5) == [ 0.0, 0.5, 1.0 ]
15 assert create_float_range(0.0, 1.0, 0.05) == [ 0.0, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.0 ]
</pre>
</div>
</div>
</div>
<div id="issue-530">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>51<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
47 })
48
49
50 def test_get_str_value() -&gt; None:
51 assert config.get_str_value(&#x27;str.valid&#x27;) == &#x27;a&#x27;
52 assert config.get_str_value(&#x27;str.unset&#x27;, &#x27;b&#x27;) == &#x27;b&#x27;
53 assert config.get_str_value(&#x27;str.unset&#x27;) is None
54 assert config.get_str_value(&#x27;str.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-531">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>52<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
48
49
50 def test_get_str_value() -&gt; None:
51 assert config.get_str_value(&#x27;str.valid&#x27;) == &#x27;a&#x27;
52 assert config.get_str_value(&#x27;str.unset&#x27;, &#x27;b&#x27;) == &#x27;b&#x27;
53 assert config.get_str_value(&#x27;str.unset&#x27;) is None
54 assert config.get_str_value(&#x27;str.invalid&#x27;) is None
55
</pre>
</div>
</div>
</div>
<div id="issue-532">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>53<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
49
50 def test_get_str_value() -&gt; None:
51 assert config.get_str_value(&#x27;str.valid&#x27;) == &#x27;a&#x27;
52 assert config.get_str_value(&#x27;str.unset&#x27;, &#x27;b&#x27;) == &#x27;b&#x27;
53 assert config.get_str_value(&#x27;str.unset&#x27;) is None
54 assert config.get_str_value(&#x27;str.invalid&#x27;) is None
55
56
</pre>
</div>
</div>
</div>
<div id="issue-533">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>54<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
50 def test_get_str_value() -&gt; None:
51 assert config.get_str_value(&#x27;str.valid&#x27;) == &#x27;a&#x27;
52 assert config.get_str_value(&#x27;str.unset&#x27;, &#x27;b&#x27;) == &#x27;b&#x27;
53 assert config.get_str_value(&#x27;str.unset&#x27;) is None
54 assert config.get_str_value(&#x27;str.invalid&#x27;) is None
55
56
57 def test_get_int_value() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-534">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>58<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
54 assert config.get_str_value(&#x27;str.invalid&#x27;) is None
55
56
57 def test_get_int_value() -&gt; None:
58 assert config.get_int_value(&#x27;int.valid&#x27;) == 1
59 assert config.get_int_value(&#x27;int.unset&#x27;, &#x27;1&#x27;) == 1
60 assert config.get_int_value(&#x27;int.unset&#x27;) is None
61 assert config.get_int_value(&#x27;int.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-535">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>59<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
55
56
57 def test_get_int_value() -&gt; None:
58 assert config.get_int_value(&#x27;int.valid&#x27;) == 1
59 assert config.get_int_value(&#x27;int.unset&#x27;, &#x27;1&#x27;) == 1
60 assert config.get_int_value(&#x27;int.unset&#x27;) is None
61 assert config.get_int_value(&#x27;int.invalid&#x27;) is None
62
</pre>
</div>
</div>
</div>
<div id="issue-536">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
56
57 def test_get_int_value() -&gt; None:
58 assert config.get_int_value(&#x27;int.valid&#x27;) == 1
59 assert config.get_int_value(&#x27;int.unset&#x27;, &#x27;1&#x27;) == 1
60 assert config.get_int_value(&#x27;int.unset&#x27;) is None
61 assert config.get_int_value(&#x27;int.invalid&#x27;) is None
62
63
</pre>
</div>
</div>
</div>
<div id="issue-537">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>61<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
57 def test_get_int_value() -&gt; None:
58 assert config.get_int_value(&#x27;int.valid&#x27;) == 1
59 assert config.get_int_value(&#x27;int.unset&#x27;, &#x27;1&#x27;) == 1
60 assert config.get_int_value(&#x27;int.unset&#x27;) is None
61 assert config.get_int_value(&#x27;int.invalid&#x27;) is None
62
63
64 def test_get_float_value() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-538">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>65<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
61 assert config.get_int_value(&#x27;int.invalid&#x27;) is None
62
63
64 def test_get_float_value() -&gt; None:
65 assert config.get_float_value(&#x27;float.valid&#x27;) == 1.0
66 assert config.get_float_value(&#x27;float.unset&#x27;, &#x27;1.0&#x27;) == 1.0
67 assert config.get_float_value(&#x27;float.unset&#x27;) is None
68 assert config.get_float_value(&#x27;float.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-539">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>66<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
62
63
64 def test_get_float_value() -&gt; None:
65 assert config.get_float_value(&#x27;float.valid&#x27;) == 1.0
66 assert config.get_float_value(&#x27;float.unset&#x27;, &#x27;1.0&#x27;) == 1.0
67 assert config.get_float_value(&#x27;float.unset&#x27;) is None
68 assert config.get_float_value(&#x27;float.invalid&#x27;) is None
69
</pre>
</div>
</div>
</div>
<div id="issue-540">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>67<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
63
64 def test_get_float_value() -&gt; None:
65 assert config.get_float_value(&#x27;float.valid&#x27;) == 1.0
66 assert config.get_float_value(&#x27;float.unset&#x27;, &#x27;1.0&#x27;) == 1.0
67 assert config.get_float_value(&#x27;float.unset&#x27;) is None
68 assert config.get_float_value(&#x27;float.invalid&#x27;) is None
69
70
</pre>
</div>
</div>
</div>
<div id="issue-541">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>68<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
64 def test_get_float_value() -&gt; None:
65 assert config.get_float_value(&#x27;float.valid&#x27;) == 1.0
66 assert config.get_float_value(&#x27;float.unset&#x27;, &#x27;1.0&#x27;) == 1.0
67 assert config.get_float_value(&#x27;float.unset&#x27;) is None
68 assert config.get_float_value(&#x27;float.invalid&#x27;) is None
69
70
71 def test_get_bool_value() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-542">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>72<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
68 assert config.get_float_value(&#x27;float.invalid&#x27;) is None
69
70
71 def test_get_bool_value() -&gt; None:
72 assert config.get_bool_value(&#x27;bool.valid&#x27;) is True
73 assert config.get_bool_value(&#x27;bool.unset&#x27;, &#x27;False&#x27;) is False
74 assert config.get_bool_value(&#x27;bool.unset&#x27;) is None
75 assert config.get_bool_value(&#x27;bool.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-543">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>73<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
69
70
71 def test_get_bool_value() -&gt; None:
72 assert config.get_bool_value(&#x27;bool.valid&#x27;) is True
73 assert config.get_bool_value(&#x27;bool.unset&#x27;, &#x27;False&#x27;) is False
74 assert config.get_bool_value(&#x27;bool.unset&#x27;) is None
75 assert config.get_bool_value(&#x27;bool.invalid&#x27;) is None
76
</pre>
</div>
</div>
</div>
<div id="issue-544">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>74<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
70
71 def test_get_bool_value() -&gt; None:
72 assert config.get_bool_value(&#x27;bool.valid&#x27;) is True
73 assert config.get_bool_value(&#x27;bool.unset&#x27;, &#x27;False&#x27;) is False
74 assert config.get_bool_value(&#x27;bool.unset&#x27;) is None
75 assert config.get_bool_value(&#x27;bool.invalid&#x27;) is None
76
77
</pre>
</div>
</div>
</div>
<div id="issue-545">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>75<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
71 def test_get_bool_value() -&gt; None:
72 assert config.get_bool_value(&#x27;bool.valid&#x27;) is True
73 assert config.get_bool_value(&#x27;bool.unset&#x27;, &#x27;False&#x27;) is False
74 assert config.get_bool_value(&#x27;bool.unset&#x27;) is None
75 assert config.get_bool_value(&#x27;bool.invalid&#x27;) is None
76
77
78 def test_get_str_list() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-546">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>79<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
75 assert config.get_bool_value(&#x27;bool.invalid&#x27;) is None
76
77
78 def test_get_str_list() -&gt; None:
79 assert config.get_str_list(&#x27;str_list.valid&#x27;) == [ &#x27;a&#x27;, &#x27;b&#x27;, &#x27;c&#x27; ]
80 assert config.get_str_list(&#x27;str_list.unset&#x27;, &#x27;c b a&#x27;) == [ &#x27;c&#x27;, &#x27;b&#x27;, &#x27;a&#x27; ]
81 assert config.get_str_list(&#x27;str_list.unset&#x27;) is None
82 assert config.get_str_list(&#x27;str_list.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-547">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>80<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
76
77
78 def test_get_str_list() -&gt; None:
79 assert config.get_str_list(&#x27;str_list.valid&#x27;) == [ &#x27;a&#x27;, &#x27;b&#x27;, &#x27;c&#x27; ]
80 assert config.get_str_list(&#x27;str_list.unset&#x27;, &#x27;c b a&#x27;) == [ &#x27;c&#x27;, &#x27;b&#x27;, &#x27;a&#x27; ]
81 assert config.get_str_list(&#x27;str_list.unset&#x27;) is None
82 assert config.get_str_list(&#x27;str_list.invalid&#x27;) is None
83
</pre>
</div>
</div>
</div>
<div id="issue-548">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>81<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
77
78 def test_get_str_list() -&gt; None:
79 assert config.get_str_list(&#x27;str_list.valid&#x27;) == [ &#x27;a&#x27;, &#x27;b&#x27;, &#x27;c&#x27; ]
80 assert config.get_str_list(&#x27;str_list.unset&#x27;, &#x27;c b a&#x27;) == [ &#x27;c&#x27;, &#x27;b&#x27;, &#x27;a&#x27; ]
81 assert config.get_str_list(&#x27;str_list.unset&#x27;) is None
82 assert config.get_str_list(&#x27;str_list.invalid&#x27;) is None
83
84
</pre>
</div>
</div>
</div>
<div id="issue-549">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>82<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
78 def test_get_str_list() -&gt; None:
79 assert config.get_str_list(&#x27;str_list.valid&#x27;) == [ &#x27;a&#x27;, &#x27;b&#x27;, &#x27;c&#x27; ]
80 assert config.get_str_list(&#x27;str_list.unset&#x27;, &#x27;c b a&#x27;) == [ &#x27;c&#x27;, &#x27;b&#x27;, &#x27;a&#x27; ]
81 assert config.get_str_list(&#x27;str_list.unset&#x27;) is None
82 assert config.get_str_list(&#x27;str_list.invalid&#x27;) is None
83
84
85 def test_get_int_list() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-550">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>86<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
82 assert config.get_str_list(&#x27;str_list.invalid&#x27;) is None
83
84
85 def test_get_int_list() -&gt; None:
86 assert config.get_int_list(&#x27;int_list.valid&#x27;) == [ 1, 2, 3 ]
87 assert config.get_int_list(&#x27;int_list.unset&#x27;, &#x27;3 2 1&#x27;) == [ 3, 2, 1 ]
88 assert config.get_int_list(&#x27;int_list.unset&#x27;) is None
89 assert config.get_int_list(&#x27;int_list.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-551">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>87<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
83
84
85 def test_get_int_list() -&gt; None:
86 assert config.get_int_list(&#x27;int_list.valid&#x27;) == [ 1, 2, 3 ]
87 assert config.get_int_list(&#x27;int_list.unset&#x27;, &#x27;3 2 1&#x27;) == [ 3, 2, 1 ]
88 assert config.get_int_list(&#x27;int_list.unset&#x27;) is None
89 assert config.get_int_list(&#x27;int_list.invalid&#x27;) is None
90
</pre>
</div>
</div>
</div>
<div id="issue-552">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>88<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
84
85 def test_get_int_list() -&gt; None:
86 assert config.get_int_list(&#x27;int_list.valid&#x27;) == [ 1, 2, 3 ]
87 assert config.get_int_list(&#x27;int_list.unset&#x27;, &#x27;3 2 1&#x27;) == [ 3, 2, 1 ]
88 assert config.get_int_list(&#x27;int_list.unset&#x27;) is None
89 assert config.get_int_list(&#x27;int_list.invalid&#x27;) is None
90
91
</pre>
</div>
</div>
</div>
<div id="issue-553">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>89<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
85 def test_get_int_list() -&gt; None:
86 assert config.get_int_list(&#x27;int_list.valid&#x27;) == [ 1, 2, 3 ]
87 assert config.get_int_list(&#x27;int_list.unset&#x27;, &#x27;3 2 1&#x27;) == [ 3, 2, 1 ]
88 assert config.get_int_list(&#x27;int_list.unset&#x27;) is None
89 assert config.get_int_list(&#x27;int_list.invalid&#x27;) is None
90
91
92 def test_get_float_list() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-554">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>93<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
89 assert config.get_int_list(&#x27;int_list.invalid&#x27;) is None
90
91
92 def test_get_float_list() -&gt; None:
93 assert config.get_float_list(&#x27;float_list.valid&#x27;) == [ 1.0, 2.0, 3.0 ]
94 assert config.get_float_list(&#x27;float_list.unset&#x27;, &#x27;3.0 2.0 1.0&#x27;) == [ 3.0, 2.0, 1.0 ]
95 assert config.get_float_list(&#x27;float_list.unset&#x27;) is None
96 assert config.get_float_list(&#x27;float_list.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-555">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>94<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
90
91
92 def test_get_float_list() -&gt; None:
93 assert config.get_float_list(&#x27;float_list.valid&#x27;) == [ 1.0, 2.0, 3.0 ]
94 assert config.get_float_list(&#x27;float_list.unset&#x27;, &#x27;3.0 2.0 1.0&#x27;) == [ 3.0, 2.0, 1.0 ]
95 assert config.get_float_list(&#x27;float_list.unset&#x27;) is None
96 assert config.get_float_list(&#x27;float_list.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-556">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>95<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
91
92 def test_get_float_list() -&gt; None:
93 assert config.get_float_list(&#x27;float_list.valid&#x27;) == [ 1.0, 2.0, 3.0 ]
94 assert config.get_float_list(&#x27;float_list.unset&#x27;, &#x27;3.0 2.0 1.0&#x27;) == [ 3.0, 2.0, 1.0 ]
95 assert config.get_float_list(&#x27;float_list.unset&#x27;) is None
96 assert config.get_float_list(&#x27;float_list.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-557">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_config.py</a><br>
<b>Line number: </b>96<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
92 def test_get_float_list() -&gt; None:
93 assert config.get_float_list(&#x27;float_list.valid&#x27;) == [ 1.0, 2.0, 3.0 ]
94 assert config.get_float_list(&#x27;float_list.unset&#x27;, &#x27;3.0 2.0 1.0&#x27;) == [ 3.0, 2.0, 1.0 ]
95 assert config.get_float_list(&#x27;float_list.unset&#x27;) is None
96 assert config.get_float_list(&#x27;float_list.invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-558">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
11 ])
12
13
14 def test_get_download_size() -&gt; None:
15 assert get_download_size(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;) == 191675
16 assert get_download_size(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-360p.mp4&#x27;) == 370732
17 assert get_download_size(&#x27;invalid&#x27;) == 0
18
</pre>
</div>
</div>
</div>
<div id="issue-559">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
12
13
14 def test_get_download_size() -&gt; None:
15 assert get_download_size(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;) == 191675
16 assert get_download_size(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-360p.mp4&#x27;) == 370732
17 assert get_download_size(&#x27;invalid&#x27;) == 0
18
19
</pre>
</div>
</div>
</div>
<div id="issue-560">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py</a><br>
<b>Line number: </b>17<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
13
14 def test_get_download_size() -&gt; None:
15 assert get_download_size(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;) == 191675
16 assert get_download_size(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-360p.mp4&#x27;) == 370732
17 assert get_download_size(&#x27;invalid&#x27;) == 0
18
19
20 def test_is_download_done() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-561">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
17 assert get_download_size(&#x27;invalid&#x27;) == 0
18
19
20 def test_is_download_done() -&gt; None:
21 assert is_download_done(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is True
22 assert is_download_done(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is False
23 assert is_download_done(&#x27;invalid&#x27;, &#x27;invalid&#x27;) is False
</pre>
</div>
</div>
</div>
<div id="issue-562">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18
19
20 def test_is_download_done() -&gt; None:
21 assert is_download_done(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is True
22 assert is_download_done(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is False
23 assert is_download_done(&#x27;invalid&#x27;, &#x27;invalid&#x27;) is False
</pre>
</div>
</div>
</div>
<div id="issue-563">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_download.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19
20 def test_is_download_done() -&gt; None:
21 assert is_download_done(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is True
22 assert is_download_done(&#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is False
23 assert is_download_done(&#x27;invalid&#x27;, &#x27;invalid&#x27;) is False
</pre>
</div>
</div>
</div>
<div id="issue-564">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py</a><br>
<b>Line number: </b>5<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1 from deepfuze.execution import encode_execution_providers, decode_execution_providers, has_execution_provider, apply_execution_provider_options
2
3
4 def test_encode_execution_providers() -&gt; None:
5 assert encode_execution_providers([ &#x27;CPUExecutionProvider&#x27; ]) == [ &#x27;cpu&#x27; ]
6
7
8 def test_decode_execution_providers() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-565">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py</a><br>
<b>Line number: </b>9<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
5 assert encode_execution_providers([ &#x27;CPUExecutionProvider&#x27; ]) == [ &#x27;cpu&#x27; ]
6
7
8 def test_decode_execution_providers() -&gt; None:
9 assert decode_execution_providers([ &#x27;cpu&#x27; ]) == [ &#x27;CPUExecutionProvider&#x27; ]
10
11
12 def test_has_execution_provider() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-566">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py</a><br>
<b>Line number: </b>13<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
9 assert decode_execution_providers([ &#x27;cpu&#x27; ]) == [ &#x27;CPUExecutionProvider&#x27; ]
10
11
12 def test_has_execution_provider() -&gt; None:
13 assert has_execution_provider(&#x27;CPUExecutionProvider&#x27;) is True
14 assert has_execution_provider(&#x27;InvalidExecutionProvider&#x27;) is False
15
16
</pre>
</div>
</div>
</div>
<div id="issue-567">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py</a><br>
<b>Line number: </b>14<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
10
11
12 def test_has_execution_provider() -&gt; None:
13 assert has_execution_provider(&#x27;CPUExecutionProvider&#x27;) is True
14 assert has_execution_provider(&#x27;InvalidExecutionProvider&#x27;) is False
15
16
17 def test_multiple_execution_providers() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-568">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_execution.py</a><br>
<b>Line number: </b>27<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
23 &#x27;device_id&#x27;: &#x27;1&#x27;,
24 &#x27;cudnn_conv_algo_search&#x27;: &#x27;DEFAULT&#x27;
25 })
26 ]
27 assert apply_execution_provider_options(&#x27;1&#x27;, [ &#x27;CPUExecutionProvider&#x27;, &#x27;CUDAExecutionProvider&#x27; ]) == execution_provider_with_options
</pre>
</div>
</div>
</div>
<div id="issue-569">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import pytest
3
4 import deepfuze.globals
5 from deepfuze.download import conditional_download
6 from deepfuze.face_analyser import pre_check, clear_face_analyser, get_one_face
7 from deepfuze.typing import Face
8 from deepfuze.vision import read_static_image
</pre>
</div>
</div>
</div>
<div id="issue-570">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>17<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
13 conditional_download(&#x27;../../models/facefusion/examples&#x27;,
14 [
15 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;
16 ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.8:ih*0.8&#x27;, &#x27;../../models/facefusion/examples/source-80crop.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.7:ih*0.7&#x27;, &#x27;../../models/facefusion/examples/source-70crop.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.6:ih*0.6&#x27;, &#x27;../../models/facefusion/examples/source-60crop.jpg&#x27; ])
20
</pre>
</div>
</div>
</div>
<div id="issue-571">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>17<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
13 conditional_download(&#x27;../../models/facefusion/examples&#x27;,
14 [
15 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;
16 ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.8:ih*0.8&#x27;, &#x27;../../models/facefusion/examples/source-80crop.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.7:ih*0.7&#x27;, &#x27;../../models/facefusion/examples/source-70crop.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.6:ih*0.6&#x27;, &#x27;../../models/facefusion/examples/source-60crop.jpg&#x27; ])
20
</pre>
</div>
</div>
</div>
<div id="issue-572">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>18<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
14 [
15 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;
16 ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.8:ih*0.8&#x27;, &#x27;../../models/facefusion/examples/source-80crop.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.7:ih*0.7&#x27;, &#x27;../../models/facefusion/examples/source-70crop.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.6:ih*0.6&#x27;, &#x27;../../models/facefusion/examples/source-60crop.jpg&#x27; ])
20
21
</pre>
</div>
</div>
</div>
<div id="issue-573">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>18<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
14 [
15 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;
16 ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.8:ih*0.8&#x27;, &#x27;../../models/facefusion/examples/source-80crop.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.7:ih*0.7&#x27;, &#x27;../../models/facefusion/examples/source-70crop.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.6:ih*0.6&#x27;, &#x27;../../models/facefusion/examples/source-60crop.jpg&#x27; ])
20
21
</pre>
</div>
</div>
</div>
<div id="issue-574">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
15 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;
16 ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.8:ih*0.8&#x27;, &#x27;../../models/facefusion/examples/source-80crop.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.7:ih*0.7&#x27;, &#x27;../../models/facefusion/examples/source-70crop.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.6:ih*0.6&#x27;, &#x27;../../models/facefusion/examples/source-60crop.jpg&#x27; ])
20
21
22 @pytest.fixture(autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-575">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
15 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;
16 ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.8:ih*0.8&#x27;, &#x27;../../models/facefusion/examples/source-80crop.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.7:ih*0.7&#x27;, &#x27;../../models/facefusion/examples/source-70crop.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;-vf&#x27;, &#x27;crop=iw*0.6:ih*0.6&#x27;, &#x27;../../models/facefusion/examples/source-60crop.jpg&#x27; ])
20
21
22 @pytest.fixture(autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-576">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>46<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
42 for source_path in source_paths:
43 source_frame = read_static_image(source_path)
44 face = get_one_face(source_frame)
45
46 assert isinstance(face, Face)
47
48
49 def test_get_one_face_with_scrfd() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-577">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>65<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
61 for source_path in source_paths:
62 source_frame = read_static_image(source_path)
63 face = get_one_face(source_frame)
64
65 assert isinstance(face, Face)
66
67
68 def test_get_one_face_with_yoloface() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-578">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>84<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
80 for source_path in source_paths:
81 source_frame = read_static_image(source_path)
82 face = get_one_face(source_frame)
83
84 assert isinstance(face, Face)
85
86
87 def test_get_one_face_with_yunet() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-579">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_face_analyser.py</a><br>
<b>Line number: </b>103<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
99 for source_path in source_paths:
100 source_frame = read_static_image(source_path)
101 face = get_one_face(source_frame)
102
103 assert isinstance(face, Face)
</pre>
</div>
</div>
</div>
<div id="issue-580">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>2<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import glob
2 import subprocess
3 import pytest
4
5 import deepfuze.globals
6 from deepfuze import process_manager
7 from deepfuze.filesystem import get_temp_directory_path, create_temp, clear_temp
8 from deepfuze.download import conditional_download
</pre>
</div>
</div>
</div>
<div id="issue-581">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
17 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
18 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;,
19 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-582">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
17 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
18 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;,
19 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-583">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
18 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;,
19 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
25
</pre>
</div>
</div>
</div>
<div id="issue-584">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
18 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3&#x27;,
19 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
25
</pre>
</div>
</div>
</div>
<div id="issue-585">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
19 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
25
26
</pre>
</div>
</div>
</div>
<div id="issue-586">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
19 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
25
26
</pre>
</div>
</div>
</div>
<div id="issue-587">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
25
26
27 @pytest.fixture(scope = &#x27;function&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-588">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
20 ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.wav&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
25
26
27 @pytest.fixture(scope = &#x27;function&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-589">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>46<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
42 for target_path in target_paths:
43 temp_directory_path = get_temp_directory_path(target_path)
44 create_temp(target_path)
45
46 assert extract_frames(target_path, &#x27;452x240&#x27;, 30.0) is True
47 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == 324
48
49 clear_temp(target_path)
</pre>
</div>
</div>
</div>
<div id="issue-590">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>47<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
43 temp_directory_path = get_temp_directory_path(target_path)
44 create_temp(target_path)
45
46 assert extract_frames(target_path, &#x27;452x240&#x27;, 30.0) is True
47 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == 324
48
49 clear_temp(target_path)
50
</pre>
</div>
</div>
</div>
<div id="issue-591">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>65<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
61 for target_path, frame_total in data_provider:
62 temp_directory_path = get_temp_directory_path(target_path)
63 create_temp(target_path)
64
65 assert extract_frames(target_path, &#x27;452x240&#x27;, 30.0) is True
66 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == frame_total
67
68 clear_temp(target_path)
</pre>
</div>
</div>
</div>
<div id="issue-592">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>66<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
62 temp_directory_path = get_temp_directory_path(target_path)
63 create_temp(target_path)
64
65 assert extract_frames(target_path, &#x27;452x240&#x27;, 30.0) is True
66 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == frame_total
67
68 clear_temp(target_path)
69
</pre>
</div>
</div>
</div>
<div id="issue-593">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>85<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
81 for target_path, frame_total in data_provider:
82 temp_directory_path = get_temp_directory_path(target_path)
83 create_temp(target_path)
84
85 assert extract_frames(target_path, &#x27;452x240&#x27;, 30.0) is True
86 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == frame_total
87
88 clear_temp(target_path)
</pre>
</div>
</div>
</div>
<div id="issue-594">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>86<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
82 temp_directory_path = get_temp_directory_path(target_path)
83 create_temp(target_path)
84
85 assert extract_frames(target_path, &#x27;452x240&#x27;, 30.0) is True
86 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == frame_total
87
88 clear_temp(target_path)
89
</pre>
</div>
</div>
</div>
<div id="issue-595">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>104<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
100 for target_path, frame_total in data_provider:
101 temp_directory_path = get_temp_directory_path(target_path)
102 create_temp(target_path)
103
104 assert extract_frames(target_path, &#x27;426x240&#x27;, 30.0) is True
105 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == frame_total
106
107 clear_temp(target_path)
</pre>
</div>
</div>
</div>
<div id="issue-596">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>105<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
101 temp_directory_path = get_temp_directory_path(target_path)
102 create_temp(target_path)
103
104 assert extract_frames(target_path, &#x27;426x240&#x27;, 30.0) is True
105 assert len(glob.glob1(temp_directory_path, &#x27;*.jpg&#x27;)) == frame_total
106
107 clear_temp(target_path)
108
</pre>
</div>
</div>
</div>
<div id="issue-597">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>111<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
107 clear_temp(target_path)
108
109
110 def test_read_audio_buffer() -&gt; None:
111 assert isinstance(read_audio_buffer(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 1, 1), bytes)
112 assert isinstance(read_audio_buffer(&#x27;../../models/facefusion/examples/source.wav&#x27;, 1, 1), bytes)
113 assert read_audio_buffer(&#x27;../../models/facefusion/examples/invalid.mp3&#x27;, 1, 1) is None
</pre>
</div>
</div>
</div>
<div id="issue-598">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>112<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
108
109
110 def test_read_audio_buffer() -&gt; None:
111 assert isinstance(read_audio_buffer(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 1, 1), bytes)
112 assert isinstance(read_audio_buffer(&#x27;../../models/facefusion/examples/source.wav&#x27;, 1, 1), bytes)
113 assert read_audio_buffer(&#x27;../../models/facefusion/examples/invalid.mp3&#x27;, 1, 1) is None
</pre>
</div>
</div>
</div>
<div id="issue-599">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_ffmpeg.py</a><br>
<b>Line number: </b>113<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
109
110 def test_read_audio_buffer() -&gt; None:
111 assert isinstance(read_audio_buffer(&#x27;../../models/facefusion/examples/source.mp3&#x27;, 1, 1), bytes)
112 assert isinstance(read_audio_buffer(&#x27;../../models/facefusion/examples/source.wav&#x27;, 1, 1), bytes)
113 assert read_audio_buffer(&#x27;../../models/facefusion/examples/invalid.mp3&#x27;, 1, 1) is None
</pre>
</div>
</div>
</div>
<div id="issue-600">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
17 shutil.copyfile(&#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/söurce.jpg&#x27;)
18
19
20 def test_get_file_size() -&gt; None:
21 assert get_file_size(&#x27;../../models/facefusion/examples/source.jpg&#x27;) &gt; 0
22 assert get_file_size(&#x27;invalid&#x27;) == 0
23
24
</pre>
</div>
</div>
</div>
<div id="issue-601">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18
19
20 def test_get_file_size() -&gt; None:
21 assert get_file_size(&#x27;../../models/facefusion/examples/source.jpg&#x27;) &gt; 0
22 assert get_file_size(&#x27;invalid&#x27;) == 0
23
24
25 def test_is_file() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-602">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>26<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
22 assert get_file_size(&#x27;invalid&#x27;) == 0
23
24
25 def test_is_file() -&gt; None:
26 assert is_file(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is True
27 assert is_file(&#x27;../../models/facefusion/examples&#x27;) is False
28 assert is_file(&#x27;invalid&#x27;) is False
29
</pre>
</div>
</div>
</div>
<div id="issue-603">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>27<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
23
24
25 def test_is_file() -&gt; None:
26 assert is_file(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is True
27 assert is_file(&#x27;../../models/facefusion/examples&#x27;) is False
28 assert is_file(&#x27;invalid&#x27;) is False
29
30
</pre>
</div>
</div>
</div>
<div id="issue-604">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
24
25 def test_is_file() -&gt; None:
26 assert is_file(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is True
27 assert is_file(&#x27;../../models/facefusion/examples&#x27;) is False
28 assert is_file(&#x27;invalid&#x27;) is False
29
30
31 def test_is_directory() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-605">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>32<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
28 assert is_file(&#x27;invalid&#x27;) is False
29
30
31 def test_is_directory() -&gt; None:
32 assert is_directory(&#x27;../../models/facefusion/examples&#x27;) is True
33 assert is_directory(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
34 assert is_directory(&#x27;invalid&#x27;) is False
35
</pre>
</div>
</div>
</div>
<div id="issue-606">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>33<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
29
30
31 def test_is_directory() -&gt; None:
32 assert is_directory(&#x27;../../models/facefusion/examples&#x27;) is True
33 assert is_directory(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
34 assert is_directory(&#x27;invalid&#x27;) is False
35
36
</pre>
</div>
</div>
</div>
<div id="issue-607">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>34<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
30
31 def test_is_directory() -&gt; None:
32 assert is_directory(&#x27;../../models/facefusion/examples&#x27;) is True
33 assert is_directory(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
34 assert is_directory(&#x27;invalid&#x27;) is False
35
36
37 def test_is_audio() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-608">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>38<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
34 assert is_directory(&#x27;invalid&#x27;) is False
35
36
37 def test_is_audio() -&gt; None:
38 assert is_audio(&#x27;../../models/facefusion/examples/source.mp3&#x27;) is True
39 assert is_audio(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
40 assert is_audio(&#x27;invalid&#x27;) is False
41
</pre>
</div>
</div>
</div>
<div id="issue-609">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>39<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
35
36
37 def test_is_audio() -&gt; None:
38 assert is_audio(&#x27;../../models/facefusion/examples/source.mp3&#x27;) is True
39 assert is_audio(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
40 assert is_audio(&#x27;invalid&#x27;) is False
41
42
</pre>
</div>
</div>
</div>
<div id="issue-610">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>40<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
36
37 def test_is_audio() -&gt; None:
38 assert is_audio(&#x27;../../models/facefusion/examples/source.mp3&#x27;) is True
39 assert is_audio(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
40 assert is_audio(&#x27;invalid&#x27;) is False
41
42
43 def test_has_audio() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-611">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>44<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
40 assert is_audio(&#x27;invalid&#x27;) is False
41
42
43 def test_has_audio() -&gt; None:
44 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
45 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
46 assert has_audio([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is False
47 assert has_audio([ &#x27;invalid&#x27; ]) is False
</pre>
</div>
</div>
</div>
<div id="issue-612">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>45<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
41
42
43 def test_has_audio() -&gt; None:
44 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
45 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
46 assert has_audio([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is False
47 assert has_audio([ &#x27;invalid&#x27; ]) is False
48
</pre>
</div>
</div>
</div>
<div id="issue-613">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>46<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
42
43 def test_has_audio() -&gt; None:
44 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
45 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
46 assert has_audio([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is False
47 assert has_audio([ &#x27;invalid&#x27; ]) is False
48
49
</pre>
</div>
</div>
</div>
<div id="issue-614">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>47<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
43 def test_has_audio() -&gt; None:
44 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
45 assert has_audio([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
46 assert has_audio([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is False
47 assert has_audio([ &#x27;invalid&#x27; ]) is False
48
49
50 def test_is_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-615">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>51<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
47 assert has_audio([ &#x27;invalid&#x27; ]) is False
48
49
50 def test_is_image() -&gt; None:
51 assert is_image(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is True
52 assert is_image(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is False
53 assert is_image(&#x27;invalid&#x27;) is False
54
</pre>
</div>
</div>
</div>
<div id="issue-616">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>52<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
48
49
50 def test_is_image() -&gt; None:
51 assert is_image(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is True
52 assert is_image(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is False
53 assert is_image(&#x27;invalid&#x27;) is False
54
55
</pre>
</div>
</div>
</div>
<div id="issue-617">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>53<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
49
50 def test_is_image() -&gt; None:
51 assert is_image(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is True
52 assert is_image(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is False
53 assert is_image(&#x27;invalid&#x27;) is False
54
55
56 def test_has_image() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-618">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>57<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
53 assert is_image(&#x27;invalid&#x27;) is False
54
55
56 def test_has_image() -&gt; None:
57 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
58 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
59 assert has_image([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is False
60 assert has_image([ &#x27;invalid&#x27; ]) is False
</pre>
</div>
</div>
</div>
<div id="issue-619">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>58<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
54
55
56 def test_has_image() -&gt; None:
57 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
58 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
59 assert has_image([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is False
60 assert has_image([ &#x27;invalid&#x27; ]) is False
61
</pre>
</div>
</div>
</div>
<div id="issue-620">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>59<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
55
56 def test_has_image() -&gt; None:
57 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
58 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
59 assert has_image([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is False
60 assert has_image([ &#x27;invalid&#x27; ]) is False
61
62
</pre>
</div>
</div>
</div>
<div id="issue-621">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>60<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
56 def test_has_image() -&gt; None:
57 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) is True
58 assert has_image([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is True
59 assert has_image([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) is False
60 assert has_image([ &#x27;invalid&#x27; ]) is False
61
62
63 def test_is_video() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-622">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>64<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
60 assert has_image([ &#x27;invalid&#x27; ]) is False
61
62
63 def test_is_video() -&gt; None:
64 assert is_video(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is True
65 assert is_video(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
66 assert is_video(&#x27;invalid&#x27;) is False
67
</pre>
</div>
</div>
</div>
<div id="issue-623">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>65<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
61
62
63 def test_is_video() -&gt; None:
64 assert is_video(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is True
65 assert is_video(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
66 assert is_video(&#x27;invalid&#x27;) is False
67
68
</pre>
</div>
</div>
</div>
<div id="issue-624">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>66<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
62
63 def test_is_video() -&gt; None:
64 assert is_video(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) is True
65 assert is_video(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is False
66 assert is_video(&#x27;invalid&#x27;) is False
67
68
69 def test_filter_audio_paths() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-625">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>70<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
66 assert is_video(&#x27;invalid&#x27;) is False
67
68
69 def test_filter_audio_paths() -&gt; None:
70 assert filter_audio_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == [ &#x27;../../models/facefusion/examples/source.mp3&#x27; ]
71 assert filter_audio_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) == []
72 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
73
</pre>
</div>
</div>
</div>
<div id="issue-626">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>71<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
67
68
69 def test_filter_audio_paths() -&gt; None:
70 assert filter_audio_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == [ &#x27;../../models/facefusion/examples/source.mp3&#x27; ]
71 assert filter_audio_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) == []
72 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
73
74
</pre>
</div>
</div>
</div>
<div id="issue-627">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>72<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
68
69 def test_filter_audio_paths() -&gt; None:
70 assert filter_audio_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == [ &#x27;../../models/facefusion/examples/source.mp3&#x27; ]
71 assert filter_audio_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.jpg&#x27; ]) == []
72 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
73
74
75 def test_filter_image_paths() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-628">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>76<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
72 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
73
74
75 def test_filter_image_paths() -&gt; None:
76 assert filter_image_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == [ &#x27;../../models/facefusion/examples/source.jpg&#x27; ]
77 assert filter_image_paths([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == []
78 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
79
</pre>
</div>
</div>
</div>
<div id="issue-629">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>77<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
73
74
75 def test_filter_image_paths() -&gt; None:
76 assert filter_image_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == [ &#x27;../../models/facefusion/examples/source.jpg&#x27; ]
77 assert filter_image_paths([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == []
78 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
79
80
</pre>
</div>
</div>
</div>
<div id="issue-630">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>78<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
74
75 def test_filter_image_paths() -&gt; None:
76 assert filter_image_paths([ &#x27;../../models/facefusion/examples/source.jpg&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == [ &#x27;../../models/facefusion/examples/source.jpg&#x27; ]
77 assert filter_image_paths([ &#x27;../../models/facefusion/examples/source.mp3&#x27;, &#x27;../../models/facefusion/examples/source.mp3&#x27; ]) == []
78 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
79
80
81 def test_list_directory() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-631">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>82<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
78 assert filter_audio_paths([ &#x27;invalid&#x27; ]) == []
79
80
81 def test_list_directory() -&gt; None:
82 assert list_directory(&#x27;../../models/facefusion/examples&#x27;)
83 assert list_directory(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is None
84 assert list_directory(&#x27;invalid&#x27;) is None
85
</pre>
</div>
</div>
</div>
<div id="issue-632">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>83<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
79
80
81 def test_list_directory() -&gt; None:
82 assert list_directory(&#x27;../../models/facefusion/examples&#x27;)
83 assert list_directory(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is None
84 assert list_directory(&#x27;invalid&#x27;) is None
85
86
</pre>
</div>
</div>
</div>
<div id="issue-633">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>84<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
80
81 def test_list_directory() -&gt; None:
82 assert list_directory(&#x27;../../models/facefusion/examples&#x27;)
83 assert list_directory(&#x27;../../models/facefusion/examples/source.jpg&#x27;) is None
84 assert list_directory(&#x27;invalid&#x27;) is None
85
86
87 def test_sanitize_path_for_windows() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-634">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>89<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
85
86
87 def test_sanitize_path_for_windows() -&gt; None:
88 if is_windows():
89 assert sanitize_path_for_windows(&#x27;../../models/facefusion/examples/söurce.jpg&#x27;) == &#x27;ASSETS~1/examples/SURCE~1.JPG&#x27;
90 assert sanitize_path_for_windows(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-635">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_filesystem.py</a><br>
<b>Line number: </b>90<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
86
87 def test_sanitize_path_for_windows() -&gt; None:
88 if is_windows():
89 assert sanitize_path_for_windows(&#x27;../../models/facefusion/examples/söurce.jpg&#x27;) == &#x27;ASSETS~1/examples/SURCE~1.JPG&#x27;
90 assert sanitize_path_for_windows(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-636">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_memory.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_memory.py</a><br>
<b>Line number: </b>6<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
2 from deepfuze.memory import limit_system_memory
3
4
5 def test_limit_system_memory() -&gt; None:
6 assert limit_system_memory(4) is True
7 if is_linux() or is_macos():
8 assert limit_system_memory(1024) is False
</pre>
</div>
</div>
</div>
<div id="issue-637">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_memory.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_memory.py</a><br>
<b>Line number: </b>8<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
4
5 def test_limit_system_memory() -&gt; None:
6 assert limit_system_memory(4) is True
7 if is_linux() or is_macos():
8 assert limit_system_memory(1024) is False
</pre>
</div>
</div>
</div>
<div id="issue-638">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>7<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
3
4
5 def test_normalize_output_path() -&gt; None:
6 if is_linux() or is_macos():
7 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;
8 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).startswith(&#x27;../../models/facefusion/examples/target-240p&#x27;)
9 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).endswith(&#x27;.mp4&#x27;)
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
</pre>
</div>
</div>
</div>
<div id="issue-639">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>8<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
4
5 def test_normalize_output_path() -&gt; None:
6 if is_linux() or is_macos():
7 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;
8 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).startswith(&#x27;../../models/facefusion/examples/target-240p&#x27;)
9 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).endswith(&#x27;.mp4&#x27;)
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-640">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>9<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
5 def test_normalize_output_path() -&gt; None:
6 if is_linux() or is_macos():
7 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;
8 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).startswith(&#x27;../../models/facefusion/examples/target-240p&#x27;)
9 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).endswith(&#x27;.mp4&#x27;)
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
12 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/invalid/output.mp4&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-641">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>10<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
6 if is_linux() or is_macos():
7 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;
8 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).startswith(&#x27;../../models/facefusion/examples/target-240p&#x27;)
9 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).endswith(&#x27;.mp4&#x27;)
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
12 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/invalid/output.mp4&#x27;) is None
13 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-642">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>11<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
7 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;
8 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).startswith(&#x27;../../models/facefusion/examples/target-240p&#x27;)
9 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).endswith(&#x27;.mp4&#x27;)
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
12 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/invalid/output.mp4&#x27;) is None
13 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is None
14 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, None) is None
</pre>
</div>
</div>
</div>
<div id="issue-643">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>12<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
8 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).startswith(&#x27;../../models/facefusion/examples/target-240p&#x27;)
9 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).endswith(&#x27;.mp4&#x27;)
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
12 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/invalid/output.mp4&#x27;) is None
13 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is None
14 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, None) is None
15 assert normalize_output_path(None, &#x27;../../models/facefusion/examples/output.mp4&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-644">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>13<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
9 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples&#x27;).endswith(&#x27;.mp4&#x27;)
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
12 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/invalid/output.mp4&#x27;) is None
13 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is None
14 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, None) is None
15 assert normalize_output_path(None, &#x27;../../models/facefusion/examples/output.mp4&#x27;) is None
16
</pre>
</div>
</div>
</div>
<div id="issue-645">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>14<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
10 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/output.mp4&#x27;) == &#x27;../../models/facefusion/examples/output.mp4&#x27;
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
12 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/invalid/output.mp4&#x27;) is None
13 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is None
14 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, None) is None
15 assert normalize_output_path(None, &#x27;../../models/facefusion/examples/output.mp4&#x27;) is None
16
17
</pre>
</div>
</div>
</div>
<div id="issue-646">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
11 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/examples/invalid&#x27;) is None
12 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;../../models/facefusion/invalid/output.mp4&#x27;) is None
13 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;invalid&#x27;) is None
14 assert normalize_output_path(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, None) is None
15 assert normalize_output_path(None, &#x27;../../models/facefusion/examples/output.mp4&#x27;) is None
16
17
18 def test_normalize_padding() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-647">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
15 assert normalize_output_path(None, &#x27;../../models/facefusion/examples/output.mp4&#x27;) is None
16
17
18 def test_normalize_padding() -&gt; None:
19 assert normalize_padding([ 0, 0, 0, 0 ]) == (0, 0, 0, 0)
20 assert normalize_padding([ 1 ]) == (1, 1, 1, 1)
21 assert normalize_padding([ 1, 2 ]) == (1, 2, 1, 2)
22 assert normalize_padding([ 1, 2, 3 ]) == (1, 2, 3, 2)
</pre>
</div>
</div>
</div>
<div id="issue-648">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
16
17
18 def test_normalize_padding() -&gt; None:
19 assert normalize_padding([ 0, 0, 0, 0 ]) == (0, 0, 0, 0)
20 assert normalize_padding([ 1 ]) == (1, 1, 1, 1)
21 assert normalize_padding([ 1, 2 ]) == (1, 2, 1, 2)
22 assert normalize_padding([ 1, 2, 3 ]) == (1, 2, 3, 2)
23 assert normalize_padding(None) is None
</pre>
</div>
</div>
</div>
<div id="issue-649">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
17
18 def test_normalize_padding() -&gt; None:
19 assert normalize_padding([ 0, 0, 0, 0 ]) == (0, 0, 0, 0)
20 assert normalize_padding([ 1 ]) == (1, 1, 1, 1)
21 assert normalize_padding([ 1, 2 ]) == (1, 2, 1, 2)
22 assert normalize_padding([ 1, 2, 3 ]) == (1, 2, 3, 2)
23 assert normalize_padding(None) is None
24
</pre>
</div>
</div>
</div>
<div id="issue-650">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18 def test_normalize_padding() -&gt; None:
19 assert normalize_padding([ 0, 0, 0, 0 ]) == (0, 0, 0, 0)
20 assert normalize_padding([ 1 ]) == (1, 1, 1, 1)
21 assert normalize_padding([ 1, 2 ]) == (1, 2, 1, 2)
22 assert normalize_padding([ 1, 2, 3 ]) == (1, 2, 3, 2)
23 assert normalize_padding(None) is None
24
25
</pre>
</div>
</div>
</div>
<div id="issue-651">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
19 assert normalize_padding([ 0, 0, 0, 0 ]) == (0, 0, 0, 0)
20 assert normalize_padding([ 1 ]) == (1, 1, 1, 1)
21 assert normalize_padding([ 1, 2 ]) == (1, 2, 1, 2)
22 assert normalize_padding([ 1, 2, 3 ]) == (1, 2, 3, 2)
23 assert normalize_padding(None) is None
24
25
26 def test_normalize_fps() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-652">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>27<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
23 assert normalize_padding(None) is None
24
25
26 def test_normalize_fps() -&gt; None:
27 assert normalize_fps(0.0) == 1.0
28 assert normalize_fps(25.0) == 25.0
29 assert normalize_fps(61.0) == 60.0
30 assert normalize_fps(None) is None
</pre>
</div>
</div>
</div>
<div id="issue-653">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
24
25
26 def test_normalize_fps() -&gt; None:
27 assert normalize_fps(0.0) == 1.0
28 assert normalize_fps(25.0) == 25.0
29 assert normalize_fps(61.0) == 60.0
30 assert normalize_fps(None) is None
</pre>
</div>
</div>
</div>
<div id="issue-654">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>29<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
25
26 def test_normalize_fps() -&gt; None:
27 assert normalize_fps(0.0) == 1.0
28 assert normalize_fps(25.0) == 25.0
29 assert normalize_fps(61.0) == 60.0
30 assert normalize_fps(None) is None
</pre>
</div>
</div>
</div>
<div id="issue-655">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_normalizer.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
26 def test_normalize_fps() -&gt; None:
27 assert normalize_fps(0.0) == 1.0
28 assert normalize_fps(25.0) == 25.0
29 assert normalize_fps(61.0) == 60.0
30 assert normalize_fps(None) is None
</pre>
</div>
</div>
</div>
<div id="issue-656">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_process_manager.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_process_manager.py</a><br>
<b>Line number: </b>8<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
4 def test_start() -&gt; None:
5 set_process_state(&#x27;pending&#x27;)
6 start()
7
8 assert is_processing()
9
10
11 def test_stop() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-657">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_process_manager.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_process_manager.py</a><br>
<b>Line number: </b>15<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
11 def test_stop() -&gt; None:
12 set_process_state(&#x27;processing&#x27;)
13 stop()
14
15 assert is_stopping()
16
17
18 def test_end() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-658">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_process_manager.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_process_manager.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
18 def test_end() -&gt; None:
19 set_process_state(&#x27;processing&#x27;)
20 end()
21
22 assert is_pending()
</pre>
</div>
</div>
</div>
<div id="issue-659">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>1<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import subprocess
2 import pytest
3
4 from deepfuze.download import conditional_download
5 from deepfuze.vision import detect_image_resolution, restrict_image_resolution, create_image_resolutions, get_video_frame, count_video_frame_total, detect_video_fps, restrict_video_fps, detect_video_resolution, restrict_video_resolution, create_video_resolutions, normalize_resolution, pack_resolution, unpack_resolution
6
7
8 @pytest.fixture(scope = &#x27;module&#x27;, autouse = True)
</pre>
</div>
</div>
</div>
<div id="issue-660">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;,
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1080p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-661">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
12 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg&#x27;,
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;,
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1080p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-662">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>17<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;,
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1080p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-663">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>17<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
13 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4&#x27;,
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1080p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-664">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>18<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1080p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-665">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>18<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
14 &#x27;https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1080p.mp4&#x27;
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-666">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-667">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
15 ])
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-668">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-669">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>20<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
16 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-240p.jpg&#x27; ])
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-670">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-671">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>21<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
17 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;../../models/facefusion/examples/target-1080p.jpg&#x27; ])
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
</pre>
</div>
</div>
</div>
<div id="issue-672">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
25
</pre>
</div>
</div>
</div>
<div id="issue-673">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>22<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
18 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27; ])
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
25
</pre>
</div>
</div>
</div>
<div id="issue-674">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
25
26
</pre>
</div>
</div>
</div>
<div id="issue-675">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>23<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
19 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vframes&#x27;, &#x27;1&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27; ])
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
25
26
</pre>
</div>
</div>
</div>
<div id="issue-676">
<div class="issue-block issue-sev-low">
<b>start_process_with_partial_path: </b> Starting a process with a partial executable path<br>
<b>Test ID:</b> B607<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html</a><br>
<div class="code">
<pre>
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
25
26
27 def test_detect_image_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-677">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>24<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
20 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=25&#x27;, &#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27; ])
21 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=30&#x27;, &#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27; ])
22 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;fps=60&#x27;, &#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27; ])
23 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-240p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27; ])
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
25
26
27 def test_detect_image_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-678">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>28<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
24 subprocess.run([ &#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, &#x27;-vf&#x27;, &#x27;transpose=0&#x27;, &#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27; ])
25
26
27 def test_detect_image_resolution() -&gt; None:
28 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p.jpg&#x27;) == (426, 226)
29 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27;) == (226, 426)
30 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;) == (2048, 1080)
31 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27;) == (1080, 2048)
</pre>
</div>
</div>
</div>
<div id="issue-679">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>29<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
25
26
27 def test_detect_image_resolution() -&gt; None:
28 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p.jpg&#x27;) == (426, 226)
29 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27;) == (226, 426)
30 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;) == (2048, 1080)
31 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27;) == (1080, 2048)
32 assert detect_image_resolution(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-680">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>30<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
26
27 def test_detect_image_resolution() -&gt; None:
28 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p.jpg&#x27;) == (426, 226)
29 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27;) == (226, 426)
30 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;) == (2048, 1080)
31 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27;) == (1080, 2048)
32 assert detect_image_resolution(&#x27;invalid&#x27;) is None
33
</pre>
</div>
</div>
</div>
<div id="issue-681">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
27 def test_detect_image_resolution() -&gt; None:
28 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p.jpg&#x27;) == (426, 226)
29 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27;) == (226, 426)
30 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;) == (2048, 1080)
31 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27;) == (1080, 2048)
32 assert detect_image_resolution(&#x27;invalid&#x27;) is None
33
34
</pre>
</div>
</div>
</div>
<div id="issue-682">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>32<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
28 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p.jpg&#x27;) == (426, 226)
29 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.jpg&#x27;) == (226, 426)
30 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;) == (2048, 1080)
31 assert detect_image_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.jpg&#x27;) == (1080, 2048)
32 assert detect_image_resolution(&#x27;invalid&#x27;) is None
33
34
35 def test_restrict_image_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-683">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>36<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
32 assert detect_image_resolution(&#x27;invalid&#x27;) is None
33
34
35 def test_restrict_image_resolution() -&gt; None:
36 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (426, 226)) == (426, 226)
37 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (2048, 1080)) == (2048, 1080)
38 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (4096, 2160)) == (2048, 1080)
39
</pre>
</div>
</div>
</div>
<div id="issue-684">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>37<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
33
34
35 def test_restrict_image_resolution() -&gt; None:
36 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (426, 226)) == (426, 226)
37 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (2048, 1080)) == (2048, 1080)
38 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (4096, 2160)) == (2048, 1080)
39
40
</pre>
</div>
</div>
</div>
<div id="issue-685">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>38<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
34
35 def test_restrict_image_resolution() -&gt; None:
36 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (426, 226)) == (426, 226)
37 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (2048, 1080)) == (2048, 1080)
38 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (4096, 2160)) == (2048, 1080)
39
40
41 def test_create_image_resolutions() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-686">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>42<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
38 assert restrict_image_resolution(&#x27;../../models/facefusion/examples/target-1080p.jpg&#x27;, (4096, 2160)) == (2048, 1080)
39
40
41 def test_create_image_resolutions() -&gt; None:
42 assert create_image_resolutions((426, 226)) == [ &#x27;106x56&#x27;, &#x27;212x112&#x27;, &#x27;320x170&#x27;, &#x27;426x226&#x27;, &#x27;640x340&#x27;, &#x27;852x452&#x27;, &#x27;1064x564&#x27;, &#x27;1278x678&#x27;, &#x27;1492x792&#x27;, &#x27;1704x904&#x27; ]
43 assert create_image_resolutions((226, 426)) == [ &#x27;56x106&#x27;, &#x27;112x212&#x27;, &#x27;170x320&#x27;, &#x27;226x426&#x27;, &#x27;340x640&#x27;, &#x27;452x852&#x27;, &#x27;564x1064&#x27;, &#x27;678x1278&#x27;, &#x27;792x1492&#x27;, &#x27;904x1704&#x27; ]
44 assert create_image_resolutions((2048, 1080)) == [ &#x27;512x270&#x27;, &#x27;1024x540&#x27;, &#x27;1536x810&#x27;, &#x27;2048x1080&#x27;, &#x27;3072x1620&#x27;, &#x27;4096x2160&#x27;, &#x27;5120x2700&#x27;, &#x27;6144x3240&#x27;, &#x27;7168x3780&#x27;, &#x27;8192x4320&#x27; ]
45 assert create_image_resolutions((1080, 2048)) == [ &#x27;270x512&#x27;, &#x27;540x1024&#x27;, &#x27;810x1536&#x27;, &#x27;1080x2048&#x27;, &#x27;1620x3072&#x27;, &#x27;2160x4096&#x27;, &#x27;2700x5120&#x27;, &#x27;3240x6144&#x27;, &#x27;3780x7168&#x27;, &#x27;4320x8192&#x27; ]
</pre>
</div>
</div>
</div>
<div id="issue-687">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>43<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
39
40
41 def test_create_image_resolutions() -&gt; None:
42 assert create_image_resolutions((426, 226)) == [ &#x27;106x56&#x27;, &#x27;212x112&#x27;, &#x27;320x170&#x27;, &#x27;426x226&#x27;, &#x27;640x340&#x27;, &#x27;852x452&#x27;, &#x27;1064x564&#x27;, &#x27;1278x678&#x27;, &#x27;1492x792&#x27;, &#x27;1704x904&#x27; ]
43 assert create_image_resolutions((226, 426)) == [ &#x27;56x106&#x27;, &#x27;112x212&#x27;, &#x27;170x320&#x27;, &#x27;226x426&#x27;, &#x27;340x640&#x27;, &#x27;452x852&#x27;, &#x27;564x1064&#x27;, &#x27;678x1278&#x27;, &#x27;792x1492&#x27;, &#x27;904x1704&#x27; ]
44 assert create_image_resolutions((2048, 1080)) == [ &#x27;512x270&#x27;, &#x27;1024x540&#x27;, &#x27;1536x810&#x27;, &#x27;2048x1080&#x27;, &#x27;3072x1620&#x27;, &#x27;4096x2160&#x27;, &#x27;5120x2700&#x27;, &#x27;6144x3240&#x27;, &#x27;7168x3780&#x27;, &#x27;8192x4320&#x27; ]
45 assert create_image_resolutions((1080, 2048)) == [ &#x27;270x512&#x27;, &#x27;540x1024&#x27;, &#x27;810x1536&#x27;, &#x27;1080x2048&#x27;, &#x27;1620x3072&#x27;, &#x27;2160x4096&#x27;, &#x27;2700x5120&#x27;, &#x27;3240x6144&#x27;, &#x27;3780x7168&#x27;, &#x27;4320x8192&#x27; ]
46 assert create_image_resolutions(None) == []
</pre>
</div>
</div>
</div>
<div id="issue-688">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>44<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
40
41 def test_create_image_resolutions() -&gt; None:
42 assert create_image_resolutions((426, 226)) == [ &#x27;106x56&#x27;, &#x27;212x112&#x27;, &#x27;320x170&#x27;, &#x27;426x226&#x27;, &#x27;640x340&#x27;, &#x27;852x452&#x27;, &#x27;1064x564&#x27;, &#x27;1278x678&#x27;, &#x27;1492x792&#x27;, &#x27;1704x904&#x27; ]
43 assert create_image_resolutions((226, 426)) == [ &#x27;56x106&#x27;, &#x27;112x212&#x27;, &#x27;170x320&#x27;, &#x27;226x426&#x27;, &#x27;340x640&#x27;, &#x27;452x852&#x27;, &#x27;564x1064&#x27;, &#x27;678x1278&#x27;, &#x27;792x1492&#x27;, &#x27;904x1704&#x27; ]
44 assert create_image_resolutions((2048, 1080)) == [ &#x27;512x270&#x27;, &#x27;1024x540&#x27;, &#x27;1536x810&#x27;, &#x27;2048x1080&#x27;, &#x27;3072x1620&#x27;, &#x27;4096x2160&#x27;, &#x27;5120x2700&#x27;, &#x27;6144x3240&#x27;, &#x27;7168x3780&#x27;, &#x27;8192x4320&#x27; ]
45 assert create_image_resolutions((1080, 2048)) == [ &#x27;270x512&#x27;, &#x27;540x1024&#x27;, &#x27;810x1536&#x27;, &#x27;1080x2048&#x27;, &#x27;1620x3072&#x27;, &#x27;2160x4096&#x27;, &#x27;2700x5120&#x27;, &#x27;3240x6144&#x27;, &#x27;3780x7168&#x27;, &#x27;4320x8192&#x27; ]
46 assert create_image_resolutions(None) == []
47
</pre>
</div>
</div>
</div>
<div id="issue-689">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>45<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
41 def test_create_image_resolutions() -&gt; None:
42 assert create_image_resolutions((426, 226)) == [ &#x27;106x56&#x27;, &#x27;212x112&#x27;, &#x27;320x170&#x27;, &#x27;426x226&#x27;, &#x27;640x340&#x27;, &#x27;852x452&#x27;, &#x27;1064x564&#x27;, &#x27;1278x678&#x27;, &#x27;1492x792&#x27;, &#x27;1704x904&#x27; ]
43 assert create_image_resolutions((226, 426)) == [ &#x27;56x106&#x27;, &#x27;112x212&#x27;, &#x27;170x320&#x27;, &#x27;226x426&#x27;, &#x27;340x640&#x27;, &#x27;452x852&#x27;, &#x27;564x1064&#x27;, &#x27;678x1278&#x27;, &#x27;792x1492&#x27;, &#x27;904x1704&#x27; ]
44 assert create_image_resolutions((2048, 1080)) == [ &#x27;512x270&#x27;, &#x27;1024x540&#x27;, &#x27;1536x810&#x27;, &#x27;2048x1080&#x27;, &#x27;3072x1620&#x27;, &#x27;4096x2160&#x27;, &#x27;5120x2700&#x27;, &#x27;6144x3240&#x27;, &#x27;7168x3780&#x27;, &#x27;8192x4320&#x27; ]
45 assert create_image_resolutions((1080, 2048)) == [ &#x27;270x512&#x27;, &#x27;540x1024&#x27;, &#x27;810x1536&#x27;, &#x27;1080x2048&#x27;, &#x27;1620x3072&#x27;, &#x27;2160x4096&#x27;, &#x27;2700x5120&#x27;, &#x27;3240x6144&#x27;, &#x27;3780x7168&#x27;, &#x27;4320x8192&#x27; ]
46 assert create_image_resolutions(None) == []
47
48
</pre>
</div>
</div>
</div>
<div id="issue-690">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>46<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
42 assert create_image_resolutions((426, 226)) == [ &#x27;106x56&#x27;, &#x27;212x112&#x27;, &#x27;320x170&#x27;, &#x27;426x226&#x27;, &#x27;640x340&#x27;, &#x27;852x452&#x27;, &#x27;1064x564&#x27;, &#x27;1278x678&#x27;, &#x27;1492x792&#x27;, &#x27;1704x904&#x27; ]
43 assert create_image_resolutions((226, 426)) == [ &#x27;56x106&#x27;, &#x27;112x212&#x27;, &#x27;170x320&#x27;, &#x27;226x426&#x27;, &#x27;340x640&#x27;, &#x27;452x852&#x27;, &#x27;564x1064&#x27;, &#x27;678x1278&#x27;, &#x27;792x1492&#x27;, &#x27;904x1704&#x27; ]
44 assert create_image_resolutions((2048, 1080)) == [ &#x27;512x270&#x27;, &#x27;1024x540&#x27;, &#x27;1536x810&#x27;, &#x27;2048x1080&#x27;, &#x27;3072x1620&#x27;, &#x27;4096x2160&#x27;, &#x27;5120x2700&#x27;, &#x27;6144x3240&#x27;, &#x27;7168x3780&#x27;, &#x27;8192x4320&#x27; ]
45 assert create_image_resolutions((1080, 2048)) == [ &#x27;270x512&#x27;, &#x27;540x1024&#x27;, &#x27;810x1536&#x27;, &#x27;1080x2048&#x27;, &#x27;1620x3072&#x27;, &#x27;2160x4096&#x27;, &#x27;2700x5120&#x27;, &#x27;3240x6144&#x27;, &#x27;3780x7168&#x27;, &#x27;4320x8192&#x27; ]
46 assert create_image_resolutions(None) == []
47
48
49 def test_get_video_frame() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-691">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>50<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
46 assert create_image_resolutions(None) == []
47
48
49 def test_get_video_frame() -&gt; None:
50 assert get_video_frame(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) is not None
51 assert get_video_frame(&#x27;invalid&#x27;) is None
52
53
</pre>
</div>
</div>
</div>
<div id="issue-692">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>51<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
47
48
49 def test_get_video_frame() -&gt; None:
50 assert get_video_frame(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) is not None
51 assert get_video_frame(&#x27;invalid&#x27;) is None
52
53
54 def test_count_video_frame_total() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-693">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>55<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
51 assert get_video_frame(&#x27;invalid&#x27;) is None
52
53
54 def test_count_video_frame_total() -&gt; None:
55 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 270
56 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 324
57 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 648
58 assert count_video_frame_total(&#x27;invalid&#x27;) == 0
</pre>
</div>
</div>
</div>
<div id="issue-694">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>56<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
52
53
54 def test_count_video_frame_total() -&gt; None:
55 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 270
56 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 324
57 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 648
58 assert count_video_frame_total(&#x27;invalid&#x27;) == 0
59
</pre>
</div>
</div>
</div>
<div id="issue-695">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>57<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
53
54 def test_count_video_frame_total() -&gt; None:
55 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 270
56 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 324
57 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 648
58 assert count_video_frame_total(&#x27;invalid&#x27;) == 0
59
60
</pre>
</div>
</div>
</div>
<div id="issue-696">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>58<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
54 def test_count_video_frame_total() -&gt; None:
55 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 270
56 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 324
57 assert count_video_frame_total(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 648
58 assert count_video_frame_total(&#x27;invalid&#x27;) == 0
59
60
61 def test_detect_video_fps() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-697">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>62<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
58 assert count_video_frame_total(&#x27;invalid&#x27;) == 0
59
60
61 def test_detect_video_fps() -&gt; None:
62 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 25.0
63 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 30.0
64 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 60.0
65 assert detect_video_fps(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-698">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>63<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
59
60
61 def test_detect_video_fps() -&gt; None:
62 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 25.0
63 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 30.0
64 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 60.0
65 assert detect_video_fps(&#x27;invalid&#x27;) is None
66
</pre>
</div>
</div>
</div>
<div id="issue-699">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>64<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
60
61 def test_detect_video_fps() -&gt; None:
62 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 25.0
63 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 30.0
64 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 60.0
65 assert detect_video_fps(&#x27;invalid&#x27;) is None
66
67
</pre>
</div>
</div>
</div>
<div id="issue-700">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>65<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
61 def test_detect_video_fps() -&gt; None:
62 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-25fps.mp4&#x27;) == 25.0
63 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-30fps.mp4&#x27;) == 30.0
64 assert detect_video_fps(&#x27;../../models/facefusion/examples/target-240p-60fps.mp4&#x27;) == 60.0
65 assert detect_video_fps(&#x27;invalid&#x27;) is None
66
67
68 def test_restrict_video_fps() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-701">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>69<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
65 assert detect_video_fps(&#x27;invalid&#x27;) is None
66
67
68 def test_restrict_video_fps() -&gt; None:
69 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 20.0) == 20.0
70 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 25.0) == 25.0
71 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 60.0) == 25.0
72
</pre>
</div>
</div>
</div>
<div id="issue-702">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>70<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
66
67
68 def test_restrict_video_fps() -&gt; None:
69 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 20.0) == 20.0
70 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 25.0) == 25.0
71 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 60.0) == 25.0
72
73
</pre>
</div>
</div>
</div>
<div id="issue-703">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>71<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
67
68 def test_restrict_video_fps() -&gt; None:
69 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 20.0) == 20.0
70 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 25.0) == 25.0
71 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 60.0) == 25.0
72
73
74 def test_detect_video_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-704">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>75<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
71 assert restrict_video_fps(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, 60.0) == 25.0
72
73
74 def test_detect_video_resolution() -&gt; None:
75 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == (426, 226)
76 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27;) == (226, 426)
77 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;) == (2048, 1080)
78 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27;) == (1080, 2048)
</pre>
</div>
</div>
</div>
<div id="issue-705">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>76<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
72
73
74 def test_detect_video_resolution() -&gt; None:
75 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == (426, 226)
76 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27;) == (226, 426)
77 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;) == (2048, 1080)
78 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27;) == (1080, 2048)
79 assert detect_video_resolution(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-706">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>77<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
73
74 def test_detect_video_resolution() -&gt; None:
75 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == (426, 226)
76 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27;) == (226, 426)
77 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;) == (2048, 1080)
78 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27;) == (1080, 2048)
79 assert detect_video_resolution(&#x27;invalid&#x27;) is None
80
</pre>
</div>
</div>
</div>
<div id="issue-707">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>78<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
74 def test_detect_video_resolution() -&gt; None:
75 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == (426, 226)
76 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27;) == (226, 426)
77 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;) == (2048, 1080)
78 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27;) == (1080, 2048)
79 assert detect_video_resolution(&#x27;invalid&#x27;) is None
80
81
</pre>
</div>
</div>
</div>
<div id="issue-708">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>79<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
75 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p.mp4&#x27;) == (426, 226)
76 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-240p-90deg.mp4&#x27;) == (226, 426)
77 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;) == (2048, 1080)
78 assert detect_video_resolution(&#x27;../../models/facefusion/examples/target-1080p-90deg.mp4&#x27;) == (1080, 2048)
79 assert detect_video_resolution(&#x27;invalid&#x27;) is None
80
81
82 def test_restrict_video_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-709">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>83<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
79 assert detect_video_resolution(&#x27;invalid&#x27;) is None
80
81
82 def test_restrict_video_resolution() -&gt; None:
83 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (426, 226)) == (426, 226)
84 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (2048, 1080)) == (2048, 1080)
85 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (4096, 2160)) == (2048, 1080)
86
</pre>
</div>
</div>
</div>
<div id="issue-710">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>84<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
80
81
82 def test_restrict_video_resolution() -&gt; None:
83 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (426, 226)) == (426, 226)
84 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (2048, 1080)) == (2048, 1080)
85 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (4096, 2160)) == (2048, 1080)
86
87
</pre>
</div>
</div>
</div>
<div id="issue-711">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>85<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
81
82 def test_restrict_video_resolution() -&gt; None:
83 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (426, 226)) == (426, 226)
84 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (2048, 1080)) == (2048, 1080)
85 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (4096, 2160)) == (2048, 1080)
86
87
88 def test_create_video_resolutions() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-712">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>89<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
85 assert restrict_video_resolution(&#x27;../../models/facefusion/examples/target-1080p.mp4&#x27;, (4096, 2160)) == (2048, 1080)
86
87
88 def test_create_video_resolutions() -&gt; None:
89 assert create_video_resolutions((426, 226)) == [ &#x27;426x226&#x27;, &#x27;452x240&#x27;, &#x27;678x360&#x27;, &#x27;904x480&#x27;, &#x27;1018x540&#x27;, &#x27;1358x720&#x27;, &#x27;2036x1080&#x27;, &#x27;2714x1440&#x27;, &#x27;4072x2160&#x27;, &#x27;8144x4320&#x27; ]
90 assert create_video_resolutions((226, 426)) == [ &#x27;226x426&#x27;, &#x27;240x452&#x27;, &#x27;360x678&#x27;, &#x27;480x904&#x27;, &#x27;540x1018&#x27;, &#x27;720x1358&#x27;, &#x27;1080x2036&#x27;, &#x27;1440x2714&#x27;, &#x27;2160x4072&#x27;, &#x27;4320x8144&#x27; ]
91 assert create_video_resolutions((2048, 1080)) == [ &#x27;456x240&#x27;, &#x27;682x360&#x27;, &#x27;910x480&#x27;, &#x27;1024x540&#x27;, &#x27;1366x720&#x27;, &#x27;2048x1080&#x27;, &#x27;2730x1440&#x27;, &#x27;4096x2160&#x27;, &#x27;8192x4320&#x27; ]
92 assert create_video_resolutions((1080, 2048)) == [ &#x27;240x456&#x27;, &#x27;360x682&#x27;, &#x27;480x910&#x27;, &#x27;540x1024&#x27;, &#x27;720x1366&#x27;, &#x27;1080x2048&#x27;, &#x27;1440x2730&#x27;, &#x27;2160x4096&#x27;, &#x27;4320x8192&#x27; ]
</pre>
</div>
</div>
</div>
<div id="issue-713">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>90<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
86
87
88 def test_create_video_resolutions() -&gt; None:
89 assert create_video_resolutions((426, 226)) == [ &#x27;426x226&#x27;, &#x27;452x240&#x27;, &#x27;678x360&#x27;, &#x27;904x480&#x27;, &#x27;1018x540&#x27;, &#x27;1358x720&#x27;, &#x27;2036x1080&#x27;, &#x27;2714x1440&#x27;, &#x27;4072x2160&#x27;, &#x27;8144x4320&#x27; ]
90 assert create_video_resolutions((226, 426)) == [ &#x27;226x426&#x27;, &#x27;240x452&#x27;, &#x27;360x678&#x27;, &#x27;480x904&#x27;, &#x27;540x1018&#x27;, &#x27;720x1358&#x27;, &#x27;1080x2036&#x27;, &#x27;1440x2714&#x27;, &#x27;2160x4072&#x27;, &#x27;4320x8144&#x27; ]
91 assert create_video_resolutions((2048, 1080)) == [ &#x27;456x240&#x27;, &#x27;682x360&#x27;, &#x27;910x480&#x27;, &#x27;1024x540&#x27;, &#x27;1366x720&#x27;, &#x27;2048x1080&#x27;, &#x27;2730x1440&#x27;, &#x27;4096x2160&#x27;, &#x27;8192x4320&#x27; ]
92 assert create_video_resolutions((1080, 2048)) == [ &#x27;240x456&#x27;, &#x27;360x682&#x27;, &#x27;480x910&#x27;, &#x27;540x1024&#x27;, &#x27;720x1366&#x27;, &#x27;1080x2048&#x27;, &#x27;1440x2730&#x27;, &#x27;2160x4096&#x27;, &#x27;4320x8192&#x27; ]
93 assert create_video_resolutions(None) == []
</pre>
</div>
</div>
</div>
<div id="issue-714">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>91<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
87
88 def test_create_video_resolutions() -&gt; None:
89 assert create_video_resolutions((426, 226)) == [ &#x27;426x226&#x27;, &#x27;452x240&#x27;, &#x27;678x360&#x27;, &#x27;904x480&#x27;, &#x27;1018x540&#x27;, &#x27;1358x720&#x27;, &#x27;2036x1080&#x27;, &#x27;2714x1440&#x27;, &#x27;4072x2160&#x27;, &#x27;8144x4320&#x27; ]
90 assert create_video_resolutions((226, 426)) == [ &#x27;226x426&#x27;, &#x27;240x452&#x27;, &#x27;360x678&#x27;, &#x27;480x904&#x27;, &#x27;540x1018&#x27;, &#x27;720x1358&#x27;, &#x27;1080x2036&#x27;, &#x27;1440x2714&#x27;, &#x27;2160x4072&#x27;, &#x27;4320x8144&#x27; ]
91 assert create_video_resolutions((2048, 1080)) == [ &#x27;456x240&#x27;, &#x27;682x360&#x27;, &#x27;910x480&#x27;, &#x27;1024x540&#x27;, &#x27;1366x720&#x27;, &#x27;2048x1080&#x27;, &#x27;2730x1440&#x27;, &#x27;4096x2160&#x27;, &#x27;8192x4320&#x27; ]
92 assert create_video_resolutions((1080, 2048)) == [ &#x27;240x456&#x27;, &#x27;360x682&#x27;, &#x27;480x910&#x27;, &#x27;540x1024&#x27;, &#x27;720x1366&#x27;, &#x27;1080x2048&#x27;, &#x27;1440x2730&#x27;, &#x27;2160x4096&#x27;, &#x27;4320x8192&#x27; ]
93 assert create_video_resolutions(None) == []
94
</pre>
</div>
</div>
</div>
<div id="issue-715">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>92<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
88 def test_create_video_resolutions() -&gt; None:
89 assert create_video_resolutions((426, 226)) == [ &#x27;426x226&#x27;, &#x27;452x240&#x27;, &#x27;678x360&#x27;, &#x27;904x480&#x27;, &#x27;1018x540&#x27;, &#x27;1358x720&#x27;, &#x27;2036x1080&#x27;, &#x27;2714x1440&#x27;, &#x27;4072x2160&#x27;, &#x27;8144x4320&#x27; ]
90 assert create_video_resolutions((226, 426)) == [ &#x27;226x426&#x27;, &#x27;240x452&#x27;, &#x27;360x678&#x27;, &#x27;480x904&#x27;, &#x27;540x1018&#x27;, &#x27;720x1358&#x27;, &#x27;1080x2036&#x27;, &#x27;1440x2714&#x27;, &#x27;2160x4072&#x27;, &#x27;4320x8144&#x27; ]
91 assert create_video_resolutions((2048, 1080)) == [ &#x27;456x240&#x27;, &#x27;682x360&#x27;, &#x27;910x480&#x27;, &#x27;1024x540&#x27;, &#x27;1366x720&#x27;, &#x27;2048x1080&#x27;, &#x27;2730x1440&#x27;, &#x27;4096x2160&#x27;, &#x27;8192x4320&#x27; ]
92 assert create_video_resolutions((1080, 2048)) == [ &#x27;240x456&#x27;, &#x27;360x682&#x27;, &#x27;480x910&#x27;, &#x27;540x1024&#x27;, &#x27;720x1366&#x27;, &#x27;1080x2048&#x27;, &#x27;1440x2730&#x27;, &#x27;2160x4096&#x27;, &#x27;4320x8192&#x27; ]
93 assert create_video_resolutions(None) == []
94
95
</pre>
</div>
</div>
</div>
<div id="issue-716">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>93<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
89 assert create_video_resolutions((426, 226)) == [ &#x27;426x226&#x27;, &#x27;452x240&#x27;, &#x27;678x360&#x27;, &#x27;904x480&#x27;, &#x27;1018x540&#x27;, &#x27;1358x720&#x27;, &#x27;2036x1080&#x27;, &#x27;2714x1440&#x27;, &#x27;4072x2160&#x27;, &#x27;8144x4320&#x27; ]
90 assert create_video_resolutions((226, 426)) == [ &#x27;226x426&#x27;, &#x27;240x452&#x27;, &#x27;360x678&#x27;, &#x27;480x904&#x27;, &#x27;540x1018&#x27;, &#x27;720x1358&#x27;, &#x27;1080x2036&#x27;, &#x27;1440x2714&#x27;, &#x27;2160x4072&#x27;, &#x27;4320x8144&#x27; ]
91 assert create_video_resolutions((2048, 1080)) == [ &#x27;456x240&#x27;, &#x27;682x360&#x27;, &#x27;910x480&#x27;, &#x27;1024x540&#x27;, &#x27;1366x720&#x27;, &#x27;2048x1080&#x27;, &#x27;2730x1440&#x27;, &#x27;4096x2160&#x27;, &#x27;8192x4320&#x27; ]
92 assert create_video_resolutions((1080, 2048)) == [ &#x27;240x456&#x27;, &#x27;360x682&#x27;, &#x27;480x910&#x27;, &#x27;540x1024&#x27;, &#x27;720x1366&#x27;, &#x27;1080x2048&#x27;, &#x27;1440x2730&#x27;, &#x27;2160x4096&#x27;, &#x27;4320x8192&#x27; ]
93 assert create_video_resolutions(None) == []
94
95
96 def test_normalize_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-717">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>97<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
93 assert create_video_resolutions(None) == []
94
95
96 def test_normalize_resolution() -&gt; None:
97 assert normalize_resolution((2.5, 2.5)) == (2, 2)
98 assert normalize_resolution((3.0, 3.0)) == (4, 4)
99 assert normalize_resolution((6.5, 6.5)) == (6, 6)
100
</pre>
</div>
</div>
</div>
<div id="issue-718">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>98<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
94
95
96 def test_normalize_resolution() -&gt; None:
97 assert normalize_resolution((2.5, 2.5)) == (2, 2)
98 assert normalize_resolution((3.0, 3.0)) == (4, 4)
99 assert normalize_resolution((6.5, 6.5)) == (6, 6)
100
101
</pre>
</div>
</div>
</div>
<div id="issue-719">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>99<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
95
96 def test_normalize_resolution() -&gt; None:
97 assert normalize_resolution((2.5, 2.5)) == (2, 2)
98 assert normalize_resolution((3.0, 3.0)) == (4, 4)
99 assert normalize_resolution((6.5, 6.5)) == (6, 6)
100
101
102 def test_pack_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-720">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>103<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
99 assert normalize_resolution((6.5, 6.5)) == (6, 6)
100
101
102 def test_pack_resolution() -&gt; None:
103 assert pack_resolution((1, 1)) == &#x27;0x0&#x27;
104 assert pack_resolution((2, 2)) == &#x27;2x2&#x27;
105
106
</pre>
</div>
</div>
</div>
<div id="issue-721">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>104<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
100
101
102 def test_pack_resolution() -&gt; None:
103 assert pack_resolution((1, 1)) == &#x27;0x0&#x27;
104 assert pack_resolution((2, 2)) == &#x27;2x2&#x27;
105
106
107 def test_unpack_resolution() -&gt; None:
</pre>
</div>
</div>
</div>
<div id="issue-722">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>108<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
104 assert pack_resolution((2, 2)) == &#x27;2x2&#x27;
105
106
107 def test_unpack_resolution() -&gt; None:
108 assert unpack_resolution(&#x27;0x0&#x27;) == (0, 0)
109 assert unpack_resolution(&#x27;2x2&#x27;) == (2, 2)
</pre>
</div>
</div>
</div>
<div id="issue-723">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_vision.py</a><br>
<b>Line number: </b>109<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
105
106
107 def test_unpack_resolution() -&gt; None:
108 assert unpack_resolution(&#x27;0x0&#x27;) == (0, 0)
109 assert unpack_resolution(&#x27;2x2&#x27;) == (2, 2)
</pre>
</div>
</div>
</div>
<div id="issue-724">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_wording.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_wording.py</a><br>
<b>Line number: </b>5<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
1 from deepfuze import wording
2
3
4 def test_get() -&gt; None:
5 assert wording.get(&#x27;python_not_supported&#x27;)
6 assert wording.get(&#x27;help.source&#x27;)
7 assert wording.get(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-725">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_wording.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_wording.py</a><br>
<b>Line number: </b>6<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
2
3
4 def test_get() -&gt; None:
5 assert wording.get(&#x27;python_not_supported&#x27;)
6 assert wording.get(&#x27;help.source&#x27;)
7 assert wording.get(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-726">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/tests/test_wording.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/tests/test_wording.py</a><br>
<b>Line number: </b>7<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
3
4 def test_get() -&gt; None:
5 assert wording.get(&#x27;python_not_supported&#x27;)
6 assert wording.get(&#x27;help.source&#x27;)
7 assert wording.get(&#x27;invalid&#x27;) is None
</pre>
</div>
</div>
</div>
<div id="issue-727">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Consider possible security implications associated with the subprocess module.<br>
<b>Test ID:</b> B404<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/utils.py</a><br>
<b>Line number: </b>5<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess</a><br>
<div class="code">
<pre>
1 import hashlib
2 import os
3 from typing import Iterable
4 import shutil
5 import subprocess
6 import re
7 from collections.abc import Mapping
8 import torch
</pre>
</div>
</div>
</div>
<div id="issue-728">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/utils.py</a><br>
<b>Line number: </b>19<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
15 DIMMAX = 8192
16
17 def ffmpeg_suitability(path):
18 try:
19 version = subprocess.run([path, &quot;-version&quot;], check=True,
20 capture_output=True).stdout.decode(&quot;utf-8&quot;)
21 except:
22 return 0
23 score = 0
</pre>
</div>
</div>
</div>
<div id="issue-729">
<div class="issue-block issue-sev-low">
<b>assert_used: </b> Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.<br>
<b>Test ID:</b> B101<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/utils.py</a><br>
<b>Line number: </b>136<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html</a><br>
<div class="code">
<pre>
132 prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute))
133
134 requeue_guard = [None, 0, 0, {}]
135 def requeue_workflow(requeue_required=(-1,True)):
136 assert(len(prompt_queue.currently_running) == 1)
137 global requeue_guard
138 (run_number, _, prompt, _, _) = next(iter(prompt_queue.currently_running.values()))
139 if requeue_guard[0] != run_number:
</pre>
</div>
</div>
</div>
<div id="issue-730">
<div class="issue-block issue-sev-low">
<b>subprocess_without_shell_equals_true: </b> subprocess call - check for execution of untrusted input.<br>
<b>Test ID:</b> B603<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/78.html" target="_blank">CWE-78</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-DeepFuze/utils.py" target="_blank">/custom_nodes/Hanzo Studio-DeepFuze/utils.py</a><br>
<b>Line number: </b>163<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html</a><br>
<div class="code">
<pre>
159 if duration &gt; 0:
160 args += [&quot;-t&quot;, str(duration)]
161 try:
162 #TODO: scan for sample rate and maintain
163 res = subprocess.run(args + [&quot;-f&quot;, &quot;f32le&quot;, &quot;-&quot;],
164 capture_output=True, check=True)
165 audio = torch.frombuffer(bytearray(res.stdout), dtype=torch.float32)
166 except subprocess.CalledProcessError as e:
167 audio = torch.zeros(1,2)
</pre>
</div>
</div>
</div>
</div>
</body>
</html>