-
Notifications
You must be signed in to change notification settings - Fork 62
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
Shouldn't it be "pil_img" instead of "input"? #20
Comments
Or even np.array(pil_img) Got an error: |
Indeed, thanks for filing an issue! I'll patch it. |
c81fde0 |
@PytaichukBohdan - ah yes, another issue you may be facing is that you have to use multiples of (i believe) 16 (for size < 128) and 32 for the offsets. |
Still does not work. ResizeRight is expecting either a numpy array or a torch tensor, now it gets a PIL image which does not have shape attribute. This is what I tried and at least it runs without an error
I am not sure what was intended here as to the output shape. As it was it made 1024x512 from 1024x1024 original, for image_size 512, now this makes 512x512. I am not using offsets, BTW. As to the images produced, can't see much happening, but I guess that is another story. According to my experience guidance by comparing CLIP encoded images is not very useful as such, so I'll probably go my own way to add other ways as to image based guidance. This might depend on the kind of images I work with and how. More visuality than semantics. PS. I see now that the init image actually means using perceptual losses as guidance, rather than initialising something (like one can do with VQGAN latents for instance). So that's more like what I am after. |
I tried that also first. I guess it fails as the numpy array has shape (h, w, c) while (I think) (c, h, w) is expected. Using to_tensor takes care of this. |
clip-guided-diffusion/cgd/clip_util.py
Line 59 in 54d273e
The text was updated successfully, but these errors were encountered: