Tumgik
#so uh: 0 behaviors i've fixed in one go actually
public-trans-it · 2 months
Text
Learning AI: What is a 'step'?
I've been learning to work with generative images lately, and honestly have been having a LOT of fun with it, as you are about to see. For the most part of mostly stuck with Microsoft Copilot Designer, which runs... some kind of version of DALL-E 3. I've found it very easy to get pretty much exactly what I want out of it (mostly), but it offers jack shit in terms of consistency. And it doesn't offer me any flexibility in terms of playing with inpainting or sampling steps or guidance scale, all of which really limits what you can do outside of "Make pretty picture"
So I downloaded ComfyUI and Stable Diffusion 1.5 aaaaaand..... it kinda sucks. This stuff looks like garbage. I have no idea what I'm doing. I hate this.
But the only way to get better is by learning so time to hit it with a hammer and see what happens! First up, I'm gonna start experimenting with Sampling Steps. From what I understand, this is basically how many times this thing runs the picture through itself before handing it to you going "Okay it's done now." For example, generating a pair of black sports goggles with red lenses over 20 sampling steps gives us this:
Test 0: Control group
Tumblr media
Not bad. Those lenses are not, in fact, red. Ah well. Also I'm not a fan of photorealism in AI tbh but it gives us a decent baseline to work with. Doesn't really tell us much about what's going on under the hood though. Luckily, if you fix the seed, it will always give you the same output in the end, unless you change something else. Which means... instead of running it through the sampler 20 times... we can run it through 20 samplers 1 time and preview it each time! Which if I'm correct about how all this works will let us see what's happening every step of the way while producing the same image, LIKE THIS:
Test 1: Split the sampling steps
Tumblr media Tumblr media
That... uh... that isn't the same image. At all. Like it is clearly the same SEED, thats undeniable. The images match up too much. Sure the bottom left one LOOKS like its facing the wrong way, but if you compare the bottom curve of the frame with the previous one you will see that it lines up pretty well, which is the expected behavior of using the same seed with different prompts/processing. So we can rule the seed out as the difference.
I have clearly misunderstood something here about what sampling is. It IS consistently removing noise each step of the sampling process, as expected, but its doing it far less than it was before, and more importantly doing it DIFFERENTLY. This... kinda threw my whole experiment out the window. I was planning to do a lot of cool variations to show how these different settings would affect the final product, but that would require actually... yknow... having a baseline to use. Which I no longer do. My first test was going to be using a different seed in every sampling step. Before I started, I expected that to give me similar results to the above, but now I don't know what to expect.
Test 2: Vary the seed between steps
Tumblr media Tumblr media
Yeah. Seems about right. Absolute garbage. Honestly thought it resembles the prompt far more than I expected random seeds to. I mostly just did this one on auto-pilot while trying to devise new experiments to try to figure out what the sampler was ACTUALLY doing. This might have given us some kind of insight if my initial theory was correct, but like... as it stands this one doesn't do us much good. Well... most of these images were just a blur, what would happen if I went back to the fixed seeds, but with a step count of 5 instead of 1?
Test 3: Increase steps per sampler to 5
Tumblr media Tumblr media
Okay now we are getting somewhere! Even with the increased step count, 3/4s of the images converged to very similar images as the first experiment. And while the last one ended up different, you can see the exact moment it split away in the third step of the process. And again, you can still see how the strap at the bottom of the image still lines up with the old lense. Most of these are just a more clear version of the first test, as expected of increasing the step count.
But none of this tells us why its not converging on the same point as the initial control image. Maybe we can find out more by reducing the denoise value? The denoise is basically "how much of the previous image should be replaced" at 1.0 the full image gets replaced. At .1 then only 10% of the image gets replaced. Lets see what happens if I only replace half the image.
Test 4: Set denoise to .5
Tumblr media Tumblr media
HOLY SHIT. I AM IN LOVE. THAT LOOKS SO FUCKING COOL. Oh these are some very rad textures I can find some use for elsewhere. Holy shit. Like this doesn't tell us much actually. Like, I dont know what information I can get from this but DAMN DOES IT LOOK PRETTY. That initial beige square is expected. Thats what happens when you hook up the empty latent image generator (the first step of the process, further up in the workflow) directly to the output and skip over the model, clip prompt, and sampler. So that was what I expected as a starting point. Interestingly a couple of the images did produce human recognizable glasses/goggles in the first few steps before becoming a hell of visual noise. Alright. A denoise value of .5 is too low. Lets up that to .9 and see if thats a bit better.
Test 5: Set denoise to .9
Tumblr media Tumblr media
Ignore the seed numbers on this one. I started changing them as it was running for the next experiment, before getting blown away by the results. This is... exactly the same output as test number 3.
Tumblr media
So what the fuck? How are we ending up with the exact same output at 90% denoise strength. Sure, the difference should be subtle, but after repeating that process 20 times it should diverge more and more. After 20 repeats the differences should actually be pretty obvious, and yet instead we got the EXACT same output. WHAT THE FUCK IS THIS PROGRAM DOING? I UNDERSTAND EVEN LESS THAN WHEN I WENT IN HERE!
Alright well, what if we tried adjusting the denoise incrementally as we went? Start off high and end low. We will set the denoise back to 1 for the first sampler, but decrease it by .05 for each sampler, until reaching .01 with the last one. This should keep the starting points mostly the same as in tests 3 and 5 to start, and then slowly tweak the images as it goes on.
Test 6: Gradually decreasing denoise value
Tumblr media Tumblr media
Dave Strider wishes he had what I have. Look at those beautifully deep fried images. Incredible. Very interesting to see how these line up with the previous tests, especially with the third image, which continues to be a weird outlier. Also interesting to look at just how clear and beautiful the images are on sample #10 here.
Tumblr media
Those are CRYSTAL clear. Look at the level of detail on those straps. I think we might actually be able to salvage a useful technique or two out of this after all. Alright, now lets try reversing it, and have a gradually increasing noise. Starting at .01 and ending in 1.0.
Test 6: Gradually increasing denoise value
Tumblr media Tumblr media
...
I
I don't even understand what happened here. I need a break. I think I should just go actually look up how the sampler works instead of just beating it with a hammer until it tells me itself.
But hey! At least we finally got those red lenses out of it.
5 notes · View notes
hazard-and-friends · 3 years
Text
i see so many people turn up in forums and say “i’ve tried everything with my reactive dog, can i use an ecollar now??” and first of all, what were you doing, looking for an excuse?, but second of all, let’s talk about that “everything” and how you’ve “tried it”.
if we’re working with reactivity (vague), aggression (even more vague), barky-lungey (better!), or just plain frantic dogs, we’re working with a dog with HUGE FEELINGS. they might have huge feelings about other dogs, about people, about non-dog-non-human-animals, about the world at large, about cars, about bikes, whatever.
but all of this boils down to they don’t like their distance from some Thing, and they want to get far away (fear-based, some forms of defensive aggression) or get up close and personal (over excitement, the rest of defensive aggression, prey drive). (occasionally they want to get up close and personal in order to make sure that they can get far away, which is fear-aggression and it’s a bastard.)
so: big feelings, gotta move about it.
in very very short, when training dogs you can either work on their thinking brain (operant conditioning, cause-and-effect learning) or their emotional brain (classical conditioning, associative learning). when training BIG FEELING dogs, sure you can settle for operant conditioning and teaching them that despite their BIG FEELINGS, they’ve still got to behave in polite society and not sing the song of their people about the lab across the street. for some dogs, this is all you have to do, because if you smile you get happier, you teach your dog to behave in a relaxed manner, they become more relaxed.
except that won’t always work. i have ptsd and had a therapist tell me to be less scared of new situations, which went over like a lead balloon. some dogs are not capable of behaving in a relaxed manner until they are genuinely relaxed.
and all of this is just setting the stage for my actual point here which is: changing emotions? is a long fucking process.
if you come into a forum and say you’ve tried everything and you’ve had the dog for four fucking months, my response will be “how many methods did you try and how long did you try each method for” and if the answer is not “at least 3 weeks for each of them” i will tell you to go back and try again, do not pass go do not collect $200.
i say 3 weeks for 2 reasons.
1, because in humans it takes at least 3 weeks to make a new habit and longer than that to break old ones, so why the fuck would we cheat our dogs of that time? slow down and put in the goddamn work.
2, because 3 weeks is enough time for a trainer to get something done with you. the first session is establishing the foundations, clearing up your misconceptions about how learning happens, and generally making sure nobody will get hurt in the next week. the second session is where the trainer goes through their toolbox to find the best setup for this dog and this owner. and the third session is where they find out if it’s working and adapt. so if after all that, you are not seeing improvements, something needs to change. the method, the trainer, a vet consult, something. but 3 weeks is enough time to see change, and if the trainer can’t see it, it’s not there.
(a sidebar: i also heard about 3 weeks to see change in a separation anxiety forum, where separation anxiety trainers use it as the litmus test to refer for medication. that’s 3 weeks of training, each week has 5 sessions, each session is 20-30 minutes. 6 to 7.5 hours of training. something should change by this point, and if it’s not, and you’re following the subthreshold method, something is never going to change without pharmaceutical intervention.)
okay so: 3 weeks. if you just got the dog in [spins wheel] june, that’s 3 weeks to decompress. 3 weeks to try BAT 2.0. 3 weeks to try CAT. 3 weeks on click to calm. and 3 weeks to work on control unleashed. that’s 15 weeks since the dog came home, or a week from today, give or take. and that’s just the methods off the top of my head, i’ve got 2 or 3 more on my bookcase. you’re probably looking at 6 months of dedicated work (with a week or two for personal time), bare minimum. if you really want to do it right, add time between each method for decompression.
and if you’re going “but julis the dog BIT my NEIGHBOR’S KID I CAN’T HAVE THIS HAPPENING FOR THE NEXT 6 MONTHS” you’re right! you can’t!
put a muzzle on the dog (train it first, ideally). get a DO NOT PET vest (for the dog AND you). if the dog pulls you down, work through the anti-pull devices. rent sniffspots. go walking at 10 pm. drive into the woods to walk. do nosework in the backyard or closest grassy area (aka: scatter treats there). put a muzzle AND an anti-pull device AND a backup harness AND a chain leash if you’re really worried. get a (very very good) friend and have them get people out of the way for you. talk to a vet for medications earlier rather than later.
but these are all management, not training. training is slow. training is slow, and boring, and has these tiny amazing moments where you go HEY MY DOG JUST MET A HUMAN WITHOUT GROWLING and then realize that you sound absolutely insane to anyone else.
dog training doesn’t involve quick fixes. quit asking for them.
204 notes · View notes
Note
Tw self harm
hey uh river, my best friend is self harming and is what to do, because I’m worried she’ll get really mad at me if I tell an adult
That's sounds awful and hard to deal with. Like, 0/10. I've been in similar situations, and I know that twisty feeling in your gut that kind of clings to your insides. It's awful. And like, especially if you think they're gonna get mad at you. Like. It's horrible.
My old best friend got depression really bad in highschool, and I asked my mom for advice on how to help her, and I mentioned it briefly and my friend lost her marbles and got so mad she didn't talk to me for like, two weeks. That's one extreme.
However. One of my friends got really, really, really suicidal and self-destructive in the middle of covid. To the point where like, I had to talk to her to keep her from trying to hurt herself and to keep her hands occupied with texting me. It was not fun at all, but i'd do it again in a heartbeat to help her. However, I knew that, like. I couldn't take care of my friend and duct-tape scissors to the walls, or physically take her away from what was tempting her, or put an ice cube in her hand or anything like that. So, I literally told my mom and told her to tell her mom. My friend got therapy and mental help and a lot more love and patience than I think she'd been getting at home because of it. And she wasn't mad at me, because sometimes, like. You've gotta make the choice that needs to be made for your friend's welfare.
Like, none of this is easy. And none of us(especially kids, I was seventeen when I had to talk my friend down from hurting herself), should have the burden of keeping people away from their own thoughts and own desires on our own. I once went to a class, a communications class, actually. And the professor looked around this room of college kids and was like, "How many of you have had to talk a friend out of hurting themselves?" and literally almost every single person in the room raised their hand. She got this sad look in her eyes and she went, "That's such a hard thing to go through. And all of you have been through it."
Because, heck. It may be normalized, to some extent, but stars. We are not therapists. We are not cognitive behavioral therapists. We are not counselors. We are not parents, we can't get our friends medication, we can't do any of that stuff.
And it sucks. Because we really really really want to help.
So. Like. Here's my advice.
First.
Take a deep breath. It is going to be okay. I swear it.
Second.
There's kind of one question you have to think about.
And it's not a very easy question, because the answer seems obvious, but sometimes it's really really hard to get to that answer. And it sounds harsh, too. I'm not going to say that it doesn't. It's a rough question. But, like. It's a true question. That I think you need the answer to.
Do you care more about your friend's opinion of you, or your friend's physical wellbeing?
(i know. it's a horrible and intense question. but it's a real question.)
If you care more about your friend's opinion of you(not the answer I assume you'll pick, but just for talking's sake), just try to be there for her. Keep talking, call her if you want. Find her some safer alternatives. My favorite(hi. yes. anxiety makes me try to scratch my skin off so like i can focus on something other than my own spiralling thoughts) is putting a rubber band or hair tie on my wrist and like. Snapping it. It hurts like a bitch. But it works! Other ones I've heard that work are holding ice cubes in your hand, ice cold water bucket to stick your hands in, drawing lines on your skin with a marker or pen. Etc. Keep recommending she go to an adult. Just. Pound it into her brain.
If you pick the second option(i think you should pick this option, but i'm not in control of you and you can pick what to do), here's how I'd do it. Give her an ultimatum. Either she can tell, or you will. But someone's gotta. Because enough is too much, and she's hurting, and you can't fix it, but you want it to stop.
Tell her that this is one of those things that you go to the adult with. Like, remember when you were in school and there was like, safety day, or something, where they just sat you down and told you that before going off with anyone, or before trying to tackle the burglar by yourself, you'd go get an adult. Like. This is one of the things you can't keep secret, can't keep locked up. It's a safety issue. And it's not even, "My friend is hiding illegal drugs under their mattress" although, I'd suggest telling an adult immediately about that as well. Or calling the cops.
This is actively and purposefully hurting her. And she's the danger to herself.
Tell her that you're gonna give her til... say. Tomorrow. Tomorrow evening. To tell her parents. Or you will tell your parents, who will tell hers.
Also, btw. There is no reason for you to get involved talking to her parents. That's why you have parents! To do the hard stuff like telling adults that their children are hurting themselves! <3
If you think it would be easier on you, or better than going through your own parents, that's fine, I don't know you or your relationship with your parents, but if they're chill and you're chill with them I 100% suggest going through them. Your parents are also extremely likely to believe you right off the bat, and adults are much more likely to believe other adults than kids. Just. Those are the facts.
I'd suggest you make a concrete plan to tell your parents no matter what, no matter what your friend says they've said or haven't said(because sometimes people lie to get around things like parental intervention), and just. Stick to it. That way your friend gets out of the dangerous situation as quickly as possible.
Overall, this sounds like a really rough situation to be in, and I'm sorry you're in it, love <3
i hope it gets better asap
feel free to send me another ask if you'd like more advice <3 <3 <3
9 notes · View notes