Last Layer
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
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[]=
In[]:=
ImageAdjust[decoder[%]]
Out[]=