WOLFRAM NOTEBOOK

Last Layer

In[]:=
$NetModelPath="/home/sw/Dropbox/GeneralBox/Research/LLMScience/FromNik";
In[]:=
nets=AssociationMap[FileNameJoin[{$NetModelPath,"Parameters/Stable-Diffusion-V1",#<>".wlnet"}]&,{"Unet","Encoder","Decoder"}];
In[]:=
nets
Out[]=
Unet/home/sw/Dropbox/GeneralBox/Research/LLMScience/FromNik/Parameters/Stable-Diffusion-V1/Unet.wlnet,Encoder/home/sw/Dropbox/GeneralBox/Research/LLMScience/FromNik/Parameters/Stable-Diffusion-V1/Encoder.wlnet,Decoder/home/sw/Dropbox/GeneralBox/Research/LLMScience/FromNik/Parameters/Stable-Diffusion-V1/Decoder.wlnet
In[]:=
decoder=Import[nets["Decoder"]]
Out[]=
NetChain
Inputport:
array(size: 4×64×64)
Outputport:
image
This object cannot be used as input.
FileNameJoin[{$NetModelPath,"Parameters/Stable-Diffusion-V1",#<>".wlnet"}]
In[]:=
seedimage=BlockRandom[SeedRandom[33];RandomVariate[NormalDistribution[],{4,64,64}]];
In[]:=
decoder[seedimage]
Out[]=
In[]:=
ImageAdjust[%]
Out[]=
In[]:=
ImageAdjust[decoder[BlockRandom[SeedRandom[34];RandomVariate[NormalDistribution[],{4,64,64}]]]]
Out[]=
In[]:=
Blur[Image@Transpose[BlockRandom[SeedRandom[34];RandomVariate[NormalDistribution[],{4,64,64}]],{3,1,2}]]
Out[]=
In[]:=
Transpose[ImageData[%],{2,3,1}]
Out[]=
{{
1
},
2
,{{0.387953,0.165557,0.248324,0.799864,0.395202,-0.464099,-0.912618,-0.168354,0.130547,0.0595788,-0.237116,-0.787438,-0.881691,-0.817329,
36
,-0.504454,-0.400855,-0.285399,-0.0613572,-0.133911,-0.00517543,0.41559,0.708236,0.172951,-0.272378,-0.400093,0.0551655,0.180212,-0.165045},
62
,{
1
}}}
Full expression not available
(
original memory size:
131.3 kB)
In[]:=
ImageAdjust[decoder[%]]
Out[]=
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.