I forgot to re-scale my pyramid noise for this one, so the variance of the noise seen during training was more like variance 3 than variance 1. This means sampled images tend to come out super soft and blurry. That said, to run:

```python
from diffusers import StableDiffusionPipeline
import torch, random
from torch import nn
def pyramid_noise_like(x, discount=0.9):
  b, c, w, h = x.shape
  u = nn.Upsample(size=(w, h), mode='bilinear')
  noise = torch.randn_like(x)
  for i in range(10):
    r = random.random()*2+2 # Rather than always going 2x, 
    w, h = max(1, int(w/(r**i))), max(1, int(h/(r**i)))
    noise += u(torch.randn(b, c, w, h).to(x)) * discount**i
    if w==1 or h==1: break
  return noise # Note no scaling
pipe = StableDiffusionPipeline.from_pretrained(model_path, torch_dtype=torch.float16)
pipe.to("cuda");
latents = torch.randn(1, 4, 64, 64).cuda().half()
latents = pyramid_noise_like(latents)
image = pipe(prompt="A candle in a dark room", latents=latents).images[0]
image
```
{}
diffusers tensorboard endpoints_compatible diffusers:StableDiffusionPipeline region:us
TAGS
#diffusers #tensorboard #endpoints_compatible #diffusers-StableDiffusionPipeline #region-us 

I forgot to re-scale my pyramid noise for this one, so the variance of the noise seen during training was more like variance 3 than variance 1. This means sampled images tend to come out super soft and blurry. That said, to run:


TAGS
#diffusers #tensorboard #endpoints_compatible #diffusers-StableDiffusionPipeline #region-us 

TAGS
#diffusers #tensorboard #endpoints_compatible #diffusers-StableDiffusionPipeline #region-us 
