Skip to content

u/CommunicationCalm166

In this archive from Sep 2022 to Dec 2023

5
posts
227
comments
18
media
1k
score

It can, and it does. Everything you just mentioned is implemented in packages like Hugging Face Accelerate, and other distributed compute frameworks.

The problem is: even Direct Memory Access is orders of magnitude slower than on-card memory accesses. (Like 10x slower) and in consumer products DMA has to go over the PCI bus which is slower still. (Server stuff has things like NVSwitch which is faster, but also costs more than a car.)

If you can cram your whole model into VRAM, it'll run between tens and hundreds of times faster. If you can't, it'll still work, you're just gonna have to wait. (Hugging Face Accelerate can even cache your model to NVME, if you don't have enough system RAM for it )

1 points

I'd really like to learn more about this stage actually. I've heard that before, but I don't really understand it. Like, I don't quite get why it's necessary to operate on the data in the higher-dimensional space, nor do I really get how the VAE makes that transformation to an image.

But of course I recognize a reddit post is hardly gonna be adequate to explain it either.

1 points

Because when Nvidia designed their Turing architecture, they started including devoted circuitry that did floating-point math operations at that lower precision, saving memory and memory bandwidth.

Graphics processing is done pretty much exclusively at 32-bit precision, and as such, any GPU needs to be able to do that. (In fact, before AI really took off, the GPU manufacturers were starting to include circuitry for double-precision calculations, but that's not really a thing anymore.)

Half-precision is still possible on AMD GPU's, Apple silicon, CPU's, etc. But without that specialized circuitry, the 16-bit floating-point inputs are just treated the same as a 32-bit input. No memory savings, no speed improvement, etc. Problems come up sometimes however, where the scripts expect one or the other, or where the hardware doesn't play nice with the inputs. (Frankly, it's a bit over my head why it doesn't 'just work')

2 points

Honestly, most people who are doing the native fine-tuning are doing it on cloud computing clusters. There's very little info out there.

I've personally tried to run it on my Tesla M40 24GB without any luck. But the M40 is a six-year-old card without many of the features of the 3090.

I need to test run it again for science, now that I have a stack of server GPU'S all hooked up and working. But so far I've been pretty happy with Dreambooth.

Never enough hours in the day is there?

1 points

The hugging face diffusers repo on GitHub has a native fine-tuning script in the "examples" directory. (Right next to the Dreambooth folder)

But beware... Dreambooth and Textual Inversion's claims to fame are that they will run on amounts of VRAM that could conceivably be within reach for mere mortals. The native fine-tuning script has no such luxuries. The readme specifies that it might possibly, kinda, sorta, maybe, almost run on 24GB of VRAM... And that you really need 30+ to be reasonably sure it'll work.

3 points

"Hypernetwork" is a training method for adding a concept to the model by creating a "network" of related tokens that sits "on top" of the model. Hence "hyper-network"

And even the "share=true" option isn't really "phoning home" either. It just sets up the WebUI that's running on your system to listen for local network requests, so that others on your network can interact with it.

Unless you got a tampered copy with malware added, there's not supposed to be remote operated code anywhere in Auto1111.

2 points

Yeah, I can see where you're coming from. I think the most striking similarities come when there's a hiccup in the prompt scheduler, and you get a section of image that never gets denoised.

Though I wouldn't read too much into it... Everything the AI is doing is discrete arithmetic, and the meaning we ascribe to various results is "clever pattern recognition" at best... And "harmful magical thinking" at worst.

1 points

Gonna need more info about what you're trying to do if we're going to be able to answer your question.

Are you trying to convert a diffusers model into a CKPT?

Are you trying to download a Dreambooth model off of a Collab Notebook?

Are you looking for where to download the base Stable Diffusion models to get started?

Are you trying to fine-tune your own model?

Are you trying to create a model completely from scratch?

There's many different ways to make a CKPT file, and which one depends on what you're trying to do.

2 points

Are you trying to run launch.py while you're offline? I know I had a hell of a time getting my stuff working at first because I'm on a metered connection and I kept trying to manually pre-load everything...

I wish these package manager developers would consider the use case of someone for whom a 5 gig download every week is a real problem. I've done extensive investigation, and I can find no workflow that allows the creation of an environment using only local files. Every single option I've seen downloads everything fresh. And it will stubbornly refuse to work until you let it do what it wants.

If that's not the problem though, can you give more information about the error you get when it says "cannot install torch" etc? There should be a traceback, a few paragraphs of information onscreen before it says "cannot install"

1 points

I've run an array of server GPU'S on my desktop computer via crypto mining pci-e risers. Works like a champ. And I know for a fact those are significantly slower than thunderbolt EGPU docks. (I'm currently waiting on parts to test a build using one on a non-thunderbolt laptop)

There is no reason a thunderbolt EGPU wouldn't work. Go for it if you can afford it.

1 points

Depends... How much power does your graphics card use? (TDP) because as long as it's chooching, and working on your images, it's going to be pegged at the redline.

SD hits your card like one of those benchmark/testing programs. So if you've got a 250w TDP graphics card, it's going to be pulling 250w from when you hit that 'generate' button until the images come back.

Dreambooth training I've found to be less demanding. (Maybe ~50%-70% max power) Which is good, since those can be running for a very long time.

0 points

The sampling method has less to do with the style or "look" of the final outcome, and more to do with the number of steps it takes to get a decent image out.

Different prompts interact with different samplers differently, and there really isn't any way to predict it. I recommend you stick with the default sampler and focus on your prompts and as he said, look for models fine-tuned on your particular style. You can play with the sampler if you want, but it won't give you consistent stylistic results... Just 'different'

2 points

Transparent background? No. The way the latent tensors (the raw data that the AI creates) get turned into images is by scaling the number values in each dimension from 0-255 and assigning them to RGB values.

Adding an alpha channel (transparency) would require adding another dimension to the tensors, which would make all the models that were trained with three color dimensions incompatible. Basically, it could work, but it would require re-training the model from scratch.

Now solid color background? Yeah. It's not 100% but using prompts like "character sheet" "reference" "concept drawing" have a good shot at working. For photos maybe try e-commerce related keywords like "thumbnail" "sale" "buy" "preview" "Amazon" "eBay" "checkout"

2 points

Ah, that's called "over-fitting" and it comes from training with too high of a learning rate, and/or for too many steps. (Those are both settings you can adjust.)

There's no set recipe... If you get over-fitting, turn down one or the other and try again. If you start getting outputs similar to your training images without using your keyword, you probably need to turn it waaay down.

4 points

VRAM is king in AI. I've run both image generation, as well as training on Tesla M40's, which are like server-versions of the GTX 980, (or more accurately, the Titan X, but whatever. You get the point... Six-year-old card) I can generate Desktop sized images, I can do Textual Inversion on it, I can do Dreambooth on it. All that, because it's got 24GB of VRAM on board.

On the other hand my RTX 3070, which is much, much faster, is stuck doing small 568x1024 images, and neither Textual Inversion, nor Dreambooth will work without throwing "CUDA out of memory."

VRAM is king.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.