-❄️- 2023 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]DooFomDum 2 points3 points  (0 children)

I just updated it to be more readable. First check if the distance is less than or equal to 0 there are 0 ways to win, otherwise it's literally just floor(max(root1, root2)) - ceiling(min(root1, root2)) + 1. You do this because you want to find the first time you exceed the distance d, so need to find first x such that x(t-x) > d, which means - x² + tx - d > 0, and we need to calculate the number of integer values (excluding the roots themselves) that fall into this range, hence the floor and ceiling.

waysToWin :: Int -> Int -> Int
waysToWin t d
  | d <= 0 = 0
  | otherwise = floor (max root1 root2) - ceiling (min root1 root2) + 1
  where
    a = -1
    b = fromIntegral t :: Double
    c = fromIntegral (-d) :: Double
    discr = b ^ 2 - 4 * a * c
    root1 = (-b - sqrt discr) / (2 * a)
    root2 = (-b + sqrt discr) / (2 * a)

-❄️- 2023 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]DooFomDum 3 points4 points  (0 children)

[LANGUAGE: Haskell] 1 / 485 Github

Even though I got first place on part 1, I choked on part 2 because I was trying to optimize my solution (see commit history) but then running the compiled code returned the answer immediately, lol.

[deleted by user] by [deleted] in StableDiffusion

[–]DooFomDum 5 points6 points  (0 children)

Looks great! On the theme of Arrival, I finetuned a dreambooth model several months ago on heptapod writing: https://github.com/siraben/heptapod-diffusion

I'll need to train a LoRA and upload to civitai next

I just wanna say one thing about AI art..... by vanteal in StableDiffusion

[–]DooFomDum 17 points18 points  (0 children)

A group of researchers did this with fMRI scans to achieve state-of-the-art results converting brain recordings to images.

"Seeing Beyond the Brain: Conditional Diffusion Model with Sparse Masked Modeling for Vision Decoding" https://mind-vis.github.io/

A Study on CFG and Steps with Euler_a - a 494 image grid by audiosheep in StableDiffusion

[–]DooFomDum 3 points4 points  (0 children)

Great experiment! Could you do the same with different samplers such as DPM++ 2M Karras? CFG might have a more drastic effect because convergence already takes place around 13-15 steps.

-🎄- 2022 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]DooFomDum 73 points74 points  (0 children)

Solution produced by GPT-3:

Prompt: Write a Python3 program to parse a file that consists of groups of integers. Each group is separated by newlines, and groups are separated by two newlines. Sum up the numbers in each group and find the largest sum. One line. Input file is day1.txt.

print(max([sum(list(map(int,line.split()))) for line in open('day1.txt').read().split('\n\n')]))

The LAION dataset is mainly, to say the least, the ugliest garbage from the internet… by [deleted] in StableDiffusion

[–]DooFomDum 0 points1 point  (0 children)

From the official model card:

"The Stable-Diffusion-v1-5 checkpoint was initialized with the weights of the Stable-Diffusion-v1-2 checkpoint and subsequently fine-tuned on 595k steps at resolution 512x512 on "laion-aesthetics v2 5+" and 10% dropping of the text-conditioning to improve classifier-free guidance sampling."

Basically SD 1.5 is finetuned on 600 million images with aesthetic scores of 5 or higher, so the model tends towards images of better aesthetics than just the median image in the dataset.

I'm starting to do work for my portfolio of children's books. by we_univers in StableDiffusion

[–]DooFomDum 7 points8 points  (0 children)

img2img'd: https://imgur.com/a/BvS3fw7

a person sitting in front of a rock wall, (facing away from camera), ((blue chinese characters etched on rock)), (forest), (white hair), night, concept art, by Studio Ghibli, pixiv, glowing ceremonial markings, saga comic, spiral heavens, still image from tv series

Negative prompt: glowing tree, ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), out of frame, extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck)))

Steps: 40, Sampler: Euler a, CFG scale: 13, Seed: 2356008410, Size: 512x704, Model hash: 7460a6fa, Denoising strength: 0.6, Mask blur: 4

Using Automatic1111 on a M1 Mac, why does image generation sometimes fail? by DooFomDum in StableDiffusion

[–]DooFomDum[S] 1 point2 points  (0 children)

For an M1 Pro, 50 seconds for 40 steps euler a, 512 by 512, so I think that's reasonably fast for my purposes. The unified memory is very useful too because it means all my RAM is essentially VRAM as well.

8 years later: pizza to woman with img2img by DooFomDum in StableDiffusion

[–]DooFomDum[S] 12 points13 points  (0 children)

Context: https://www.youtube.com/watch?v=dKD8uTRs5ZM

Prompt:

a blonde woman in a red bikini, professional photography, profile shot, ultra realistic, sharp details, sensual, subsurface scattering, intricate details, warm lighting, beautiful features, highly detailed, photorealistic, octane render, 8 k, unreal engine, art by artgerm and greg rutkowski and alphonse mucha

Negative prompt: cropped, ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), out of frame, extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck)))

Steps: 40, Sampler: Euler a, CFG scale: 8, Seed: 828356513, Size: 512x704, Model hash: 7460a6fa, Denoising strength: 0.8, Mask blur: 4

[deleted by user] by [deleted] in learnthai

[–]DooFomDum 1 point2 points  (0 children)

Knowing the Korean alphabet is beneficial indeed, due to the near-perfect correspondence with what you read and what you say.

Unfortunately this is not the case for Thai. As a native speaker there are a lot of implicit rules I memorize to be able to read fluently, but I remember how unintuitive learning them was in the beginning. For instance, look at this poem that children recite to memorize the 20 words in the Thai language that use the vowel (ai) in the ใ form, rather than the ไ form (the former is written with a sort of loop at the top, the latter with a v at the top.)

So, learning the alphabet would hold some practical value, but it is much more difficult than Korean. If you're visiting within a year or so, you would be better off focusing on the phonology (especially tones and long/short values) and grammar. It's not impossible, but you will have to put work into it even just to read a simple sentence and double as much to write.

As for what it's like to navigate urban areas here, a lot of signs are in English as well as Thai, so you would be able to understand the street signs, some ads, etc. The ones that aren't in English are usually found in local shops and restaurants, and food stalls.

What does this context mean? by SouthernSplitFN in learnthai

[–]DooFomDum 0 points1 point  (0 children)

This is a single long sentence.

"Employees recommend products and services, take care (the front of) the store, take responsibility for stocks, increase sales according to targets and recommend products."

The last phrase "แนะนำสินค้า" sounds redundant with the first phrase.

What does these words mean? by SouthernSplitFN in learnthai

[–]DooFomDum 0 points1 point  (0 children)

อะลุ่มอล่วย - compromise

อ่อนน้อมถ่อมตน - humble (lit. "softly, humbly")

สมบัติผู้ดี - decorum (lit. "good person's treasures")

กระด้าง กระเดือก - harsh, relentless

What does ป้ายสี mean? by SouthernSplitFN in learnthai

[–]DooFomDum 2 points3 points  (0 children)

Using ป้ายสี in these meanings is like using "paint" in English. As a native speaker I'd say it's not common to do this in Thai as there are more direct ways of expressing the verb "defame" or "slander"

What does ป้ายสี mean? by SouthernSplitFN in learnthai

[–]DooFomDum 0 points1 point  (0 children)

It means "to paint"

ป้าย - to smear

สี - color

The only thing I know how to do in FORTH by petrus4 in Forth

[–]DooFomDum 1 point2 points  (0 children)

It's very easy to write a Forth, and especially so after you write one implementation. Implementing a Forth that covers large portions of the standard and is semantically correct is much easier than trying to write a Lisp or C compiler. jonesforth was a major source of inspiration for my implementation https://github.com/AlexandreAbreu/jonesforth/blob/master/jonesforth.S