imaginAIry
imaginAIry copied to clipboard
Larger size images always trigger safety filter on the M1
-w 640 -h 896 and other larger-sized images seem to always trigger the safety filter no matter the prompt.
Thanks I'll look into that. what system architecture are you on?
Also did you try --upscale
with just 512x512. Often times good enough
MacBook Pro, M1 Max 32 GB. I have been able to make 512x768 and upscale, but I am trying to get printable images, so looking for as big as possible. Thanks for looking into it
that makes sense, for a printable image I would use LDM upscaler, which takes much longer but I think works better. You might also want to look at "gobig" I don't have either of these integrated yet but I'm working on it. Links below
https://github.com/jquesnelle/txt2imghd https://github.com/sd-webui/stable-diffusion-webui
I got this with the example command and no flags.
Generating 🖼 : "a photo of a dog" 512x512px seed:501863965 prompt-strength:7.5 steps:40 sampler-type:plms PLMS Sampler: 100%|███████████████████| 40/40 [00:30<00:00, 1.31it/s] ⚠️ Filtering NSFW image
thanks for the reproducible case @abrambailey . I'll see if the filter can be made to have fewer false-positives
@abrambailey I wasn't able to reproduce with that example actually. A hunch I have is that sometimes the generation fails, makes a black image, and that the filter that flags that blank image.
I did reproduce the larger images triggering the filter though. looking into that
The images produced at -w 640 -h 896
on the M1 are just noise, which for some reason gets flagged by the safety filter. So the safety filter is only guilty of confusing us in this case. I'm not sure what the root cause is but the little debugging I did implies the error may be originating from the model itself and thus not much I can do about it.
Next steps are to try some other codebases and see if it works there or if it's a universal problem.
Larger generations working fine on linux at least.
This might not be directly related, but on a 2070 (Windows through docker/WSL2) upscale
causes crashes on sizes above 256x256:
CUDA error: unknown error
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
I don't have the stacktrace at hand, as this is running on a machine I don't have immediate access to but I should be able to provide more later today/tomorrow. This crash was from these parameters IIRC:
ImaginePrompt(
prompt_text="hedgehogs in space",
width=512, height=512,
upscale=True, fix_faces=False,
steps=50, prompt_strength=0.7
)
This same card is able to handle 1024x1024 just fine when upscale
is not used. If this is unrelated to this issue, let me know and I will open a new issue with more detailed information.
thanks for the report @NiclasEriksen . I do think this is unrelated. Would be great if you opened another ticket.
As of 5.0.1 you can now generate larger images on the M1. It does take a lot longer though.