-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[nodes] Add latent nodes, storage, and fix iteration bugs #3091
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
Conversation
|
i paid most attention to |
|
thanks for the |
|
Just be sure to set the cache directory correctly; otherwise we’ll end up
with the VAE stored in multiple locations.
On Sun, Apr 2, 2023 at 4:57 PM Damian Stewart ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In invokeai/app/invocations/latent.py
<#3091 (comment)>:
> + callback=step_callback
+ )
+
+ # https://discuss.huggingface.co/t/memory-usage-by-later-pipeline-stages/23699
+ torch.cuda.empty_cache()
+
+ name = f'{context.graph_execution_state_id}__{self.id}'
+ context.services.latents.set(name, result_latents)
+ return LatentOutput(
+ latent=LatentField(latent_name=name)
+ )
+
+
+# Latent to image
+class LatentToImageInvocation(BaseInvocation):
+ """Generates an image from a latent."""
@Kyle0654 <https://github.com/Kyle0654> according to
https://huggingface.co/stabilityai/sd-vae-ft-mse you should be able to do
something like:
from diffusers.models import AutoencoderKL
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse")
—
Reply to this email directly, view it on GitHub
<#3091 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3EVNYE4Q7V56DEXPS3KTW7HR2PANCNFSM6AAAAAAWPKXMLU>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Written on my cell phone. Anything that seems odd is the fault of
auto-correct.
|
|
@lstein if we get this merged, could you later add something to model manager to get just the vae (in a cache-friendly way) and update LatentsToImage to use that? |
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the graph plotting in the CLI.
|
Sure. |
Add collection nodes, math nodes. Add noise node. Add some graph debug commands to the CLI. Fix negative id linking in CLI.
Fix a CLI bug with multiple links per node
195fa70 to
cd03df9
Compare
The model manager part of this request is now in PR #3120. As soon as both this PR and that one are merged with |
Adds latent nodes for text to latent and latent to latent (roughly equivalent to text to image and image to image).
Adds latent storage.
Adds simple math nodes.
Fix bug in iteration expansion that was causing incorrect edges.
Add simple range and random range collection generator nodes.
Fix bug in CLI when linking to multiple nodes.
Example of new nodes:
Generates 3 different images.