-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stable diffusion 2-1 #129
Comments
+1 to requesting this guidance.
Throws error:
|
taking a look |
hmm the first error goes away if I pass |
btw related issue here for 2.0 #124 |
Ok so you can successfully initialize it like this if you have the latest diffusers version installed ( import torch
from stable_diffusion_videos import StableDiffusionWalkPipeline
from diffusers import DPMSolverMultistepScheduler
model_id = "stabilityai/stable-diffusion-2-1"
pipe = StableDiffusionWalkPipeline.from_pretrained(
model_id,
feature_extractor=None,
safety_checker=None,
revision="fp16",
torch_dtype=torch.float16,
).to("cuda")
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config) and generate images like this: prompt = "a cat"
image = pipe(
prompt,
num_inference_steps=5,
generator=torch.Generator(device='cuda').manual_seed(42),
height=768,
width=768
).images[0] But the prompt = "a cat"
with torch.autocast('cuda'):
image = pipe(
prompt,
num_inference_steps=5,
generator=torch.Generator(device='cuda').manual_seed(42),
height=768,
width=768
).images[0]
image |
@davidrs if you're around feel free to try out the pull request above. This should work in colab:
Init the pipe import torch
from stable_diffusion_videos import StableDiffusionWalkPipeline
from diffusers import DPMSolverMultistepScheduler
model_id = "stabilityai/stable-diffusion-2-1"
pipe = StableDiffusionWalkPipeline.from_pretrained(
model_id,
feature_extractor=None,
safety_checker=None,
revision="fp16",
torch_dtype=torch.float16,
).to("cuda")
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config) Make videos video_path = pipe.walk(
['a cat', 'a dog'],
[12345, 54321],
) I did all the edits from the browser haha so not sure I want to merge and make a release til its tested a little |
Excellent @nateraw thanks for the speedy reply. |
UPDATE: it is working, must have been stale deps, or autocast. sorry. For faster testing loop:
|
Awesome. merged and made a release. Thanks for checking it so quick!! |
remove autocast nateraw#124 nateraw#129 nateraw#134
Is it possible to run this with stabilityai/stable-diffusion-2-1?
The text was updated successfully, but these errors were encountered: