In[]:=
BlockRandom[SeedRandom[33];StableDiffusionSynthesize["A cat in a party hat","ReturnIntermediates"->True,sdOptions]]
Out[]=
In[]:=
Export["BlogPictures/DiffusionSequence.wxf",%7]
Out[]=
BlogPictures/DiffusionSequence.wxf
In[]:=
ds=%7;
In[]:=
GraphicsGrid[Partition[ds[[7;;51;;4]],6]]
Out[]=
In[]:=
Export["BlogPictures/DiffusionArray.wxf",%]
Out[]=
BlogPictures/DiffusionArray.wxf
In[]:=
Range[25,36]
Out[]=
{25,26,27,28,29,30,31,32,33,34,35,36}
In[]:=
Partition[Range[25,36],6]
Out[]=
{{25,26,27,28,29,30},{31,32,33,34,35,36}}
In[]:=
Length[%]
Out[]=
12
In[]:=
seedimage=BlockRandom[SeedRandom[33];RandomVariate[NormalDistribution[],{4,64,64}]];
In[]:=
catembedding=NetModel[{"CLIP Multi-domain Feature Extractor","InputDomain"->"Text","Architecture"->"ViT-L/14"}]["A cat in a party hat",NetPort["post_normalize","Output"]];
In[]:=
GraphicsGrid[StableDiffusionSynthesize[catembedding->#&/@Table[BlockRandom[SeedRandom[n];RandomVariate[NormalDistribution[],{4,64,64}]],{n,#}],sdOptions]&/@Partition[Range[25,36],6]]
Out[]=
Contents cannot be rendered at this time; please try again later
In[]:=
Export["BlogPictures/PetShopArray.wxf",%]
Out[]=
BlogPictures/PetShopArray.wxf
In[]:=
BlockRandom[SeedRandom[33];StableDiffusionSynthesize["A cat in a party hat",sdOptions]]
Out[]=
Contents cannot be rendered at this time; please try again later
In[]:=
Export["BlogPictures/CanonicalCat.wxf",%]
Out[]=
BlogPictures/CanonicalCat.wxf
In[]:=
TextEmbeddingFunction["A cat in a party hat"]
In[]:=
ArrayPlot[%]
Out[]=
Contents cannot be rendered at this time; please try again later
Cat Dog
Cat Dog
Cat island
Cat island