Comments (5)
I tested the following and got back the exact same otter as the first example. This is basically img2img with an empty input image latent.
start_step = 0
noise = torch.randn((1, 4, 64, 64), generator=generator).to(torch_device)
latents = scheduler.add_noise(torch.zeros(1, 4, 64, 64).to(torch_device), noise, timesteps=torch.tensor([scheduler.timesteps[start_step]]))
latents = latents.to(torch_device).float()
# Loop
for i, t in tqdm(enumerate(scheduler.timesteps)):
if i >= start_step: # << This is the only modification to the loop we do
Using the existing code, it doesn't work. Also, I noticed fewer artifacts with i >= start_step
for some other samples!
from diffusion-nbs.
Sure, that would be great!
Please make sure only the relevant part of the notebook has been changed so that we don't end up storing a new set of cell outputs and such.
from diffusion-nbs.
I wasn't sure, to be honest! I think either works fine since we can decide what start_step means. I have vague recollections of there being some sort of off-by-one thing with the timesteps but I remember my specific rationale :) I'll check it out next time I have the notebook out and running, and will leave this issue open n the meantime in case anyone else has thoughts
from diffusion-nbs.
I can put up a PR if you'd like!
from diffusion-nbs.
Fixed in #21
from diffusion-nbs.
Related Issues (14)
- typo in the last code section HOT 2
- Stable Diffusion deep dive notebook can't be run on 8GB GPUs HOT 5
- How to get pred_original_sample when using PNDMScheduler HOT 1
- How to add clip loss in Guidence part for stable diffusion latent ? HOT 1
- Stable Diffusion deep dive notebook vae encoding problem HOT 2
- Broken hyperlinks for stable_diffusion.ipynb
- TypeError: __init__() got an unexpected keyword argument 'tensor_format' HOT 2
- Difference between `latents requires_grad=True` and `torch.no_grad()` HOT 2
- Deep Dive NB: Quick Fix for AttributeError: 'CLIPTextTransformer' object has no attribute '_build_causal_attention_mask' HOT 3
- FileNotFoundError: [Errno 2] No such file or directory: 'learned_embeds.bin' HOT 1
- crash
- Stable Diffusion Deep Dive fails at UNET and CFG with IndexError: index 51 is out of bounds for dimension 0 with size 51 HOT 4
- Minor typo in Stable Diffusion Deep Dive notebook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffusion-nbs.