-
Notifications
You must be signed in to change notification settings - Fork 33
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
Trace trap? Nsfw filter? #7
Comments
This was actually when I tried running img2img for the first time. It never worked. I did supply the init_img.png |
On the other computer (intel mac), it also crashes:
|
Are you on NHWC branch? I didn't tweak img2img with NHWC yet. main branch should work on M1s. |
If you pull the latest on |
It did not work on both, I tried it first on the master with M1 machine, but it keeps on complaining, "trace trap". Can you make a video demo maybe I missed something. I have the model in one folder, and the output will be in the same folder as the model. I know the example script is all in different folder. So what I did was just to replace txt2img line into img2img, with source image in the same folder as main.swift of img2img, but still not working, I don't know why. Can you have example script for img2img? Thanks. |
One thing to keep in mind, where the For usage example: I will put
If this still crashes, try to run:
So two things important here:
|
There is no safety features. Probably something to do with NaN's. I haven't fully figured out, but sometimes it will end up with some NaN's and need to re-run. Probably from seeding, or from fp16 compute. You can switch back to FP32 to see if the error gone. (Note this doesn't happen to me with NVIDIA card with the same program (swift-diffusion runs with CUDA too)). |
I tried Float32, but somewhat the calculation become really long time, the final result looking amazing however (not sure if changing the Float affect the output of stable diffusion). So my trick is simply to make .script file with 1000 lines of bazel swift diffusion command to do batch output. So the NaN issue still happen time to time again. |
Is it only reproducible with Intel or M1? Is it still reproducible with Float32? Is it only for img2img not txt2img? I am very interested in reprod and fix this. |
I use the M1 more, because it's faster, 40 seconds to generate output. The Intel one is too slow 10 minutes per image if lucky. Let say I make 100 batch overnight, just a few will give NaN and move to the next one. I usually generate image + seed number (random), the one that crashes will escape/produce none. Maybe I could print the seed? and give you prompt as well to check why this happens? This is with both txt2txt and txt2img. As with Float32 --> I change it back to Float16 because somewhat FLoat32 makes the process so much longer. If possible can we have updated script that calculate how long to run the process? Usually the way I check is by looking at the date the image created. |
Yeah, if you did the following modification, it would generate a "runtime-data-seed.dbg" file upon crash (in the same directory as the model), and this will give me a good initial point for txt2img debug: https://github.com/liuliu/swift-diffusion/compare/liu/nhwc...liu/with-data?expand=1 |
@liuliu Do I need to add the following modification myself (never done it before) or just for now, if I am up to date, maybe just generate this file anyway? I am just back to this today and seems like the repo is updating itself (?). |
Okey I got something, bad seed causing crash: bazel run examples:txt2img --compilation_mode=opt -- /Users/blendersushi/Documents/swift-diffusion-main/model "at a beautiful beach, an astronaut riding a pig with wings trending on artstation, 4k, hyperrealistic, focused, extreme details cinematic, stanley artgerm lau, wlop, rossdraws"
|
Should be able to just checking out the
Thanks, let me check tomorrow! |
I cannot reprod locally on my M1 Mac Mini machine, here is the change I made against bb919db:
Here is the command I use to run:
|
Hi Liu, the Trace Trap still happenings...
|
OK. I encountered similar problems on iPad, but not on M1. I am pretty confident it is NaN somewhere but I am not sure where is the source. Need to dig deeper. |
Occasionally, I noticed that I am not getting result and getting "trace trap"? Is there like safety filter with Swift Diffusion? Can I just turn it off because it's local anyway.
The text was updated successfully, but these errors were encountered: