You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>🤗 Diffusers is tested on Python 3.8+, MindSpore 2.2.10+. Follow the installation instructions below for the deep learning library you are using:</p>
1172
+
<p>🤗 Diffusers is tested on Python 3.8+, MindSpore 2.3+. Follow the installation instructions below for the deep learning library you are using:</p>
<h3id="output-of-autoencoderklencode">Output of <code>AutoencoderKL.encode</code><aclass="headerlink" href="#output-of-autoencoderklencode" title="Permanent link">¶</a></h3>
1202
1220
<p>Unlike the output <code>posterior = DiagonalGaussianDistribution(latent)</code>, which can do sampling by <code>posterior.sample()</code>.
1203
1221
We can only output the <code>latent</code> and then do sampling through <code>AutoencoderKL.diag_gauss_dist.sample(latent)</code>.</p>
1222
+
<h3id="selfconfig-in-construct"><code>self.config</code> in <code>construct()</code><aclass="headerlink" href="#selfconfig-in-construct" title="Permanent link">¶</a></h3>
1223
+
<p>For many models, parameters used in initialization will be registered in <code>self.config</code>. They are often accessed during the <code>construct</code> like using <code>if self.config.xxx == xxx</code> to determine execution paths in origin 🤗diffusers. However getting attributes like this is not supported by static graph syntax of MindSpore. Two feasible replacement options are</p>
1224
+
<ul>
1225
+
<li>set new attributes in initialization for <code>self</code> like <code>self.xxx = self.config.xxx</code>, then use <code>self.xxx</code> in <code>construct</code> instead.</li>
1226
+
<li>use <code>self.config["xxx"]</code> as <code>self.config</code> is an <code>OrderedDict</code> and getting items like this is supported in static graph mode.</li>
1227
+
</ul>
1228
+
<p>When <code>self.config.xxx</code> changed, we change <code>self.xxx</code> and <code>self.config["xxx"]</code> both.</p>
<p>The table below represents the current support in mindone/diffusers for each of those modules, whether they have support in Pynative fp16 mode, Graph fp16 mode, Pynative fp32 mode or Graph fp32 mode.</p>
0 commit comments