Comments (5)
@patrickvonplaten Can you take a look at this? This seems to be a diffusers issue. Thanks!
from ddim.
Dear all, thanks a lot for your reply.
I just update the version of diffusers to the same version (0.11.1), but I still meet the same problem. @patrickvonplaten
In [4]: diffusers.__version__
Out[4]: '0.11.1'
In [5]: from diffusers import DDIMPipeline
...:
...: model_id = "google/ddpm-cifar10-32"
...:
...: # load model and scheduler
...: ddim = DDIMPipeline.from_pretrained(model_id)
...:
...: # run pipeline in inference (sample random noise and denoise)
...: image = ddim(num_inference_steps=50).images[0]
...:
...: # save image
...: image.save("ddim_generated_image.png")
Fetching 4 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 24139.88it/s]
0%| | 0/50 [00:00<?, ?it/s]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-5a1f38721518> in <module>
7
8 # run pipeline in inference (sample random noise and denoise)
----> 9 image = ddim(num_inference_steps=50).images[0]
10
11 # save image
~/anaconda3/lib/python3.9/site-packages/torch/autograd/grad_mode.py in decorate_context(*args, **kwargs)
25 def decorate_context(*args, **kwargs):
26 with self.clone():
---> 27 return func(*args, **kwargs)
28 return cast(F, decorate_context)
29
~/anaconda3/lib/python3.9/site-packages/diffusers/pipelines/ddim/pipeline_ddim.py in __call__(self, batch_size, generator, eta, num_inference_steps, use_clipped_model_output, output_type, return_dict)
127 # eta corresponds to η in paper and should be between [0, 1]
128 # do x_t -> x_t-1
--> 129 image = self.scheduler.step(
130 model_output, t, image, eta=eta, use_clipped_model_output=use_clipped_model_output, generator=generator
131 ).prev_sample
~/anaconda3/lib/python3.9/site-packages/diffusers/schedulers/scheduling_ddpm.py in step(self, model_output, timestep, sample, generator, return_dict, **kwargs)
257 " DDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
258 )
--> 259 predict_epsilon = deprecate("predict_epsilon", "0.12.0", message, take_from=kwargs)
260 if predict_epsilon is not None:
261 new_config = dict(self.config)
~/anaconda3/lib/python3.9/site-packages/diffusers/utils/deprecation_utils.py in deprecate(take_from, standard_warn, *args)
41 function = call_frame.function
42 key, value = next(iter(deprecated_kwargs.items()))
---> 43 raise TypeError(f"{function} in {filename} line {line_number-1} got an unexpected keyword argument `{key}`")
44
45 if len(values) == 0:
TypeError: step in /home/yufei/anaconda3/lib/python3.9/site-packages/diffusers/schedulers/scheduling_ddpm.py line 258 got an unexpected keyword argument `eta`
from ddim.
I see! Sorry, I just noticed that the fix didn't make it into the last release: huggingface/diffusers#1932
Could you try to do:
pip install git+https://github.com/huggingface/diffusers.git
And try again. We'll do a release next week so that you won't have to install from "main" anymore then.
Sorry about this!
from ddim.
Hi @wyf0912, I encountered the same issue. Have you by any chance figured out a fix for it? Thanks!
from ddim.
Sure!
@wyf0912, @oliverow could you try to update your diffusers version?
pip install --upgrade diffusers
I've tested:
from diffusers import DDIMPipeline
model_id = "google/ddpm-cifar10-32"
# load model and scheduler
ddim = DDIMPipeline.from_pretrained(model_id)
# run pipeline in inference (sample random noise and denoise)
image = ddim(num_inference_steps=50).images[0]
# save image
image.save("ddim_generated_image.png")
and it works as expected with:
import diffusers; print(diffusers.__verison__) # 0.11.1
from ddim.
Related Issues (20)
- Does this repo support multi-GPUs?
- Transferability to transformers HOT 2
- FID of DDPM on CIFAR-10 HOT 3
- How about the training setting of CelebA model HOT 3
- Question about Lemma 1 in the paper
- test data
- DDIM inversion HOT 4
- why the activation functions formed like this in the code? HOT 1
- train loss goes very large HOT 5
- using DistributedDataParallel HOT 2
- run sampling process with cifar10 dataset HOT 1
- Generation Process not producing quality images. HOT 2
- Questions about noise distributions during training and sampling HOT 1
- Could you please provide guidance on the calculation of FID? HOT 1
- Regarding the issue of excessive FID HOT 2
- without "train" function!!!!
- Wrong fid in cifar10
- Loss is not going down HOT 2
- Why use asymmetric padding in downsample?
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 ddim.