Buckets:
| import{s as yl,o as gl,n as It}from"../chunks/scheduler.182ea377.js";import{S as wl,i as bl,g as s,s as a,p as u,A as _l,h as r,f as l,c as i,j as w,q as d,m as p,k as h,v as m,a as n,r as f,d as M,t as y,u as g}from"../chunks/index.008d68e4.js";import{T as Xt}from"../chunks/Tip.4f096367.js";import{I as Ie}from"../chunks/IconCopyLink.96bbb92b.js";import{C as T}from"../chunks/CodeBlock.5ed6eb7b.js";function Tl(U){let o,_='🤗 Accelerate is a library for helping you train on multiple GPUs/TPUs or with mixed-precision. It’ll automatically configure your training setup based on your hardware and environment. Take a look at the 🤗 Accelerate <a href="https://huggingface.co/docs/accelerate/quicktour" rel="nofollow">Quick tour</a> to learn more.';return{c(){o=s("p"),o.innerHTML=_},l(c){o=r(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1qbiqsn"&&(o.innerHTML=_)},m(c,b){n(c,o,b)},p:It,d(c){c&&l(o)}}}function Jl(U){let o,_='The following sections highlight parts of the training scripts that are important for understanding how to modify it, but it doesn’t cover every aspect of the <a href="https://github.com/huggingface/diffusers/blob/main/examples/wuerstchen/text_to_image/train_text_to_image_prior.py" rel="nofollow">script</a> in detail. If you’re interested in learning more, feel free to read through the scripts and let us know if you have any questions or concerns.';return{c(){o=s("p"),o.innerHTML=_},l(c){o=r(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1fbavkc"&&(o.innerHTML=_)},m(c,b){n(c,o,b)},p:It,d(c){c&&l(o)}}}function vl(U){let o,_="To monitor training progress with Weights & Biases, add the <code>--report_to=wandb</code> parameter to the training command. You’ll also need to add the <code>--validation_prompt</code> to the training command to keep track of results. This can be really useful for debugging the model and viewing intermediate results.";return{c(){o=s("p"),o.innerHTML=_},l(c){o=r(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1sfnrue"&&(o.innerHTML=_)},m(c,b){n(c,o,b)},p:It,d(c){c&&l(o)}}}function $l(U){let o,_,c,b,Ue,B,xt,Te,Bt="Wuerstchen",Be,R,Rt='The <a href="https://hf.co/papers/2306.00637" rel="nofollow">Wuerstchen</a> model drastically reduces computational costs by compressing the latent space by 42x, without compromising image quality and accelerating inference. During training, Wuerstchen uses two models (VQGAN + autoencoder) to compress the latents, and then a third model (text-conditioned latent diffusion model) is conditioned on this highly compressed space to generate an image.',Re,A,At="To fit the prior model into GPU memory and to speedup training, try enabling <code>gradient_accumulation_steps</code>, <code>gradient_checkpointing</code>, and <code>mixed_precision</code> respectively.",Ae,E,Et='This guide explores the <a href="https://github.com/huggingface/diffusers/blob/main/examples/wuerstchen/text_to_image/train_text_to_image_prior.py" rel="nofollow">train_text_to_image_prior.py</a> script to help you become more familiar with it, and how you can adapt it for your own use-case.',Ee,G,Gt="Before running the script, make sure you install the library from source:",Ge,V,Ve,N,Vt="Then navigate to the example folder containing the training script and install the required dependencies for the script you’re using:",Ne,F,Fe,x,He,H,Nt="Initialize an 🤗 Accelerate environment:",Ye,Y,Qe,Q,Ft="To setup a default 🤗 Accelerate environment without choosing any configurations:",Le,L,Se,S,Ht="Or if your environment doesn’t support an interactive shell, like a notebook, you can use:",ze,z,qe,q,Yt='Lastly, if you want to train a model on your own dataset, take a look at the <a href="create_dataset">Create a dataset for training</a> guide to learn how to create a dataset that works with the training script.',Pe,Z,De,J,W,xe,P,Zt,Je,Qt="Script parameters",Ke,D,Lt='The training scripts provides many parameters to help you customize your training run. All of the parameters and their descriptions are found in the <a href="https://github.com/huggingface/diffusers/blob/6e68c71503682c8693cb5b06a4da4911dfd655ee/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L192" rel="nofollow"><code>parse_args()</code></a> function. It provides default values for each parameter, such as the training batch size and learning rate, but you can also set your own values in the training command if you’d like.',Oe,K,St="For example, to speedup training with mixed precision using the fp16 format, add the <code>--mixed_precision</code> parameter to the training command:",et,O,tt,ee,zt='Most of the parameters are identical to the parameters in the <a href="text2image#script-parameters">Text-to-image</a> training guide, so let’s dive right into the Wuerstchen training script!',lt,v,k,Ze,te,Wt,ve,qt="Training script",nt,le,Pt='The training script is also similar to the <a href="text2image#training-script">Text-to-image</a> training guide, but it’s been modified to support Wuerstchen. This guide focuses on the code that is unique to the Wuerstchen training script.',at,ne,Dt='The <a href="https://github.com/huggingface/diffusers/blob/6e68c71503682c8693cb5b06a4da4911dfd655ee/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L441" rel="nofollow"><code>main()</code></a> function starts by initializing the image encoder - an <a href="https://github.com/huggingface/diffusers/blob/main/examples/wuerstchen/text_to_image/modeling_efficient_net_encoder.py" rel="nofollow">EfficientNet</a> - in addition to the usual scheduler and tokenizer.',it,ae,st,ie,Kt="You’ll also load the <code>WuerstchenPrior</code> model for optimization.",rt,se,ot,re,Ot='Next, you’ll apply some <a href="https://github.com/huggingface/diffusers/blob/65ef7a0c5c594b4f84092e328fbdd73183613b30/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L656" rel="nofollow">transforms</a> to the images and <a href="https://github.com/huggingface/diffusers/blob/65ef7a0c5c594b4f84092e328fbdd73183613b30/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L637" rel="nofollow">tokenize</a> the captions:',pt,oe,ct,pe,el='Finally, the <a href="https://github.com/huggingface/diffusers/blob/65ef7a0c5c594b4f84092e328fbdd73183613b30/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L656" rel="nofollow">training loop</a> handles compressing the images to latent space with the <code>EfficientNetEncoder</code>, adding noise to the latents, and predicting the noise residual with the <code>WuerstchenPrior</code> model.',ht,ce,mt,he,tl='If you want to learn more about how the training loop works, check out the <a href="../using-diffusers/write_own_pipeline">Understanding pipelines, models and schedulers</a> tutorial which breaks down the basic pattern of the denoising process.',ut,$,C,We,me,kt,$e,ll="Launch the script",dt,ue,nl="Once you’ve made all your changes or you’re okay with the default configuration, you’re ready to launch the training script! 🚀",ft,de,al='Set the <code>DATASET_NAME</code> environment variable to the dataset name from the Hub. This guide uses the <a href="https://huggingface.co/datasets/lambdalabs/pokemon-blip-captions" rel="nofollow">Pokémon BLIP captions</a> dataset, but you can create and train on your own datasets as well (see the <a href="create_dataset">Create a dataset for training</a> guide).',Mt,X,yt,fe,gt,Me,il="Once training is complete, you can use your newly trained model for inference!",wt,ye,bt,j,I,ke,ge,Ct,je,sl="Next steps",_t,we,rl="Congratulations on training a Wuerstchen model! To learn more about how to use your new model, the following may be helpful:",Tt,be,ol='<li>Take a look at the <a href="../api/pipelines/wuerstchen#text-to-image-generation">Wuerstchen</a> API documentation to learn more about how to use the pipeline for text-to-image generation and its limitations.</li>',Jt;return B=new Ie({}),V=new T({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmRpZmZ1c2VycyUwQWNkJTIwZGlmZnVzZXJzJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/diffusers | |
| <span class="hljs-built_in">cd</span> diffusers | |
| pip install .`}}),F=new T({props:{code:"Y2QlMjBleGFtcGxlcyUyRnd1ZXJzdGNoZW4lMkZ0ZXh0X3RvX2ltYWdlJTBBcGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:`<span class="hljs-built_in">cd</span> examples/wuerstchen/text_to_image | |
| pip install -r requirements.txt`}}),x=new Xt({props:{$$slots:{default:[Tl]},$$scope:{ctx:U}}}),Y=new T({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config"}}),L=new T({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZyUyMGRlZmF1bHQ=",highlighted:"accelerate config default"}}),z=new T({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUudXRpbHMlMjBpbXBvcnQlMjB3cml0ZV9iYXNpY19jb25maWclMEElMEF3cml0ZV9iYXNpY19jb25maWcoKQ==",highlighted:`from accelerate.utils import write_basic_config | |
| write_basic_config()`}}),Z=new Xt({props:{$$slots:{default:[Jl]},$$scope:{ctx:U}}}),P=new Ie({}),O=new T({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluX3RleHRfdG9faW1hZ2VfcHJpb3IucHklMjAlNUMlMEElMjAlMjAtLW1peGVkX3ByZWNpc2lvbiUzRCUyMmZwMTYlMjI=",highlighted:`accelerate launch train_text_to_image_prior.py \\ | |
| --mixed_precision=<span class="hljs-string">"fp16"</span>`}}),te=new Ie({}),ae=new T({props:{code:"d2l0aCUyMENvbnRleHRNYW5hZ2VycyhkZWVwc3BlZWRfemVyb19pbml0X2Rpc2FibGVkX2NvbnRleHRfbWFuYWdlcigpKSUzQSUwQSUyMCUyMCUyMCUyMHByZXRyYWluZWRfY2hlY2twb2ludF9maWxlJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUyMmRvbWUyNzIlMkZ3dWVyc3RjaGVuJTIyJTJDJTIwZmlsZW5hbWUlM0QlMjJtb2RlbF92Ml9zdGFnZV9iLnB0JTIyKSUwQSUyMCUyMCUyMCUyMHN0YXRlX2RpY3QlMjAlM0QlMjB0b3JjaC5sb2FkKHByZXRyYWluZWRfY2hlY2twb2ludF9maWxlJTJDJTIwbWFwX2xvY2F0aW9uJTNEJTIyY3B1JTIyKSUwQSUyMCUyMCUyMCUyMGltYWdlX2VuY29kZXIlMjAlM0QlMjBFZmZpY2llbnROZXRFbmNvZGVyKCklMEElMjAlMjAlMjAlMjBpbWFnZV9lbmNvZGVyLmxvYWRfc3RhdGVfZGljdChzdGF0ZV9kaWN0JTVCJTIyZWZmbmV0X3N0YXRlX2RpY3QlMjIlNUQpJTBBJTIwJTIwJTIwJTIwaW1hZ2VfZW5jb2Rlci5ldmFsKCk=",highlighted:`<span class="hljs-keyword">with</span> ContextManagers(deepspeed_zero_init_disabled_context_manager()): | |
| pretrained_checkpoint_file = hf_hub_download(<span class="hljs-string">"dome272/wuerstchen"</span>, filename=<span class="hljs-string">"model_v2_stage_b.pt"</span>) | |
| state_dict = torch.load(pretrained_checkpoint_file, map_location=<span class="hljs-string">"cpu"</span>) | |
| image_encoder = EfficientNetEncoder() | |
| image_encoder.load_state_dict(state_dict[<span class="hljs-string">"effnet_state_dict"</span>]) | |
| image_encoder.<span class="hljs-built_in">eval</span>()`}}),se=new T({props:{code:"cHJpb3IlMjAlM0QlMjBXdWVyc3RjaGVuUHJpb3IuZnJvbV9wcmV0cmFpbmVkKGFyZ3MucHJldHJhaW5lZF9wcmlvcl9tb2RlbF9uYW1lX29yX3BhdGglMkMlMjBzdWJmb2xkZXIlM0QlMjJwcmlvciUyMiklMEElMEFvcHRpbWl6ZXIlMjAlM0QlMjBvcHRpbWl6ZXJfY2xzKCUwQSUyMCUyMCUyMCUyMHByaW9yLnBhcmFtZXRlcnMoKSUyQyUwQSUyMCUyMCUyMCUyMGxyJTNEYXJncy5sZWFybmluZ19yYXRlJTJDJTBBJTIwJTIwJTIwJTIwYmV0YXMlM0QoYXJncy5hZGFtX2JldGExJTJDJTIwYXJncy5hZGFtX2JldGEyKSUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9kZWNheSUzRGFyZ3MuYWRhbV93ZWlnaHRfZGVjYXklMkMlMEElMjAlMjAlMjAlMjBlcHMlM0RhcmdzLmFkYW1fZXBzaWxvbiUyQyUwQSk=",highlighted:`prior = WuerstchenPrior.from_pretrained(args.pretrained_prior_model_name_or_path, subfolder=<span class="hljs-string">"prior"</span>) | |
| optimizer = optimizer_cls( | |
| prior.parameters(), | |
| lr=args.learning_rate, | |
| betas=(args.adam_beta1, args.adam_beta2), | |
| weight_decay=args.adam_weight_decay, | |
| eps=args.adam_epsilon, | |
| )`}}),oe=new T({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc190cmFpbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBpbWFnZXMlMjAlM0QlMjAlNUJpbWFnZS5jb252ZXJ0KCUyMlJHQiUyMiklMjBmb3IlMjBpbWFnZSUyMGluJTIwZXhhbXBsZXMlNUJpbWFnZV9jb2x1bW4lNUQlNUQlMEElMjAlMjAlMjAlMjBleGFtcGxlcyU1QiUyMmVmZm5ldF9waXhlbF92YWx1ZXMlMjIlNUQlMjAlM0QlMjAlNUJlZmZuZXRfdHJhbnNmb3JtcyhpbWFnZSklMjBmb3IlMjBpbWFnZSUyMGluJTIwaW1hZ2VzJTVEJTBBJTIwJTIwJTIwJTIwZXhhbXBsZXMlNUIlMjJ0ZXh0X2lucHV0X2lkcyUyMiU1RCUyQyUyMGV4YW1wbGVzJTVCJTIydGV4dF9tYXNrJTIyJTVEJTIwJTNEJTIwdG9rZW5pemVfY2FwdGlvbnMoZXhhbXBsZXMpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwZXhhbXBsZXM=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_train</span>(<span class="hljs-params">examples</span>): | |
| images = [image.convert(<span class="hljs-string">"RGB"</span>) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> examples[image_column]] | |
| examples[<span class="hljs-string">"effnet_pixel_values"</span>] = [effnet_transforms(image) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> images] | |
| examples[<span class="hljs-string">"text_input_ids"</span>], examples[<span class="hljs-string">"text_mask"</span>] = tokenize_captions(examples) | |
| <span class="hljs-keyword">return</span> examples`}}),ce=new T({props:{code:"cHJlZF9ub2lzZSUyMCUzRCUyMHByaW9yKG5vaXN5X2xhdGVudHMlMkMlMjB0aW1lc3RlcHMlMkMlMjBwcm9tcHRfZW1iZWRzKQ==",highlighted:"pred_noise = prior(noisy_latents, timesteps, prompt_embeds)"}}),me=new Ie({}),X=new Xt({props:{$$slots:{default:[vl]},$$scope:{ctx:U}}}),fe=new T({props:{code:"ZXhwb3J0JTIwREFUQVNFVF9OQU1FJTNEJTIybGFtYmRhbGFicyUyRnBva2Vtb24tYmxpcC1jYXB0aW9ucyUyMiUwQSUwQWFjY2VsZXJhdGUlMjBsYXVuY2glMjAlMjB0cmFpbl90ZXh0X3RvX2ltYWdlX3ByaW9yLnB5JTIwJTVDJTBBJTIwJTIwLS1taXhlZF9wcmVjaXNpb24lM0QlMjJmcDE2JTIyJTIwJTVDJTBBJTIwJTIwLS1kYXRhc2V0X25hbWUlM0QlMjREQVRBU0VUX05BTUUlMjAlNUMlMEElMjAlMjAtLXJlc29sdXRpb24lM0Q3NjglMjAlNUMlMEElMjAlMjAtLXRyYWluX2JhdGNoX3NpemUlM0Q0JTIwJTVDJTBBJTIwJTIwLS1ncmFkaWVudF9hY2N1bXVsYXRpb25fc3RlcHMlM0Q0JTIwJTVDJTBBJTIwJTIwLS1ncmFkaWVudF9jaGVja3BvaW50aW5nJTIwJTVDJTBBJTIwJTIwLS1kYXRhbG9hZGVyX251bV93b3JrZXJzJTNENCUyMCU1QyUwQSUyMCUyMC0tbWF4X3RyYWluX3N0ZXBzJTNEMTUwMDAlMjAlNUMlMEElMjAlMjAtLWxlYXJuaW5nX3JhdGUlM0QxZS0wNSUyMCU1QyUwQSUyMCUyMC0tbWF4X2dyYWRfbm9ybSUzRDElMjAlNUMlMEElMjAlMjAtLWNoZWNrcG9pbnRzX3RvdGFsX2xpbWl0JTNEMyUyMCU1QyUwQSUyMCUyMC0tbHJfc2NoZWR1bGVyJTNEJTIyY29uc3RhbnQlMjIlMjAlNUMlMEElMjAlMjAtLWxyX3dhcm11cF9zdGVwcyUzRDAlMjAlNUMlMEElMjAlMjAtLXZhbGlkYXRpb25fcHJvbXB0cyUzRCUyMkElMjByb2JvdCUyMHBva2Vtb24lMkMlMjA0ayUyMHBob3RvJTIyJTIwJTVDJTBBJTIwJTIwLS1yZXBvcnRfdG8lM0QlMjJ3YW5kYiUyMiUyMCU1QyUwQSUyMCUyMC0tcHVzaF90b19odWIlMjAlNUMlMEElMjAlMjAtLW91dHB1dF9kaXIlM0QlMjJ3dWVyc3RjaGVuLXByaW9yLXBva2Vtb24tbW9kZWwlMjI=",highlighted:`<span class="hljs-built_in">export</span> DATASET_NAME=<span class="hljs-string">"lambdalabs/pokemon-blip-captions"</span> | |
| accelerate launch train_text_to_image_prior.py \\ | |
| --mixed_precision=<span class="hljs-string">"fp16"</span> \\ | |
| --dataset_name=<span class="hljs-variable">$DATASET_NAME</span> \\ | |
| --resolution=768 \\ | |
| --train_batch_size=4 \\ | |
| --gradient_accumulation_steps=4 \\ | |
| --gradient_checkpointing \\ | |
| --dataloader_num_workers=4 \\ | |
| --max_train_steps=15000 \\ | |
| --learning_rate=1e-05 \\ | |
| --max_grad_norm=1 \\ | |
| --checkpoints_total_limit=3 \\ | |
| --lr_scheduler=<span class="hljs-string">"constant"</span> \\ | |
| --lr_warmup_steps=0 \\ | |
| --validation_prompts=<span class="hljs-string">"A robot pokemon, 4k photo"</span> \\ | |
| --report_to=<span class="hljs-string">"wandb"</span> \\ | |
| --push_to_hub \\ | |
| --output_dir=<span class="hljs-string">"wuerstchen-prior-pokemon-model"</span>`}}),ye=new T({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQWZyb20lMjBkaWZmdXNlcnMucGlwZWxpbmVzLnd1ZXJzdGNoZW4lMjBpbXBvcnQlMjBERUZBVUxUX1NUQUdFX0NfVElNRVNURVBTJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMjJwYXRoJTJGdG8lMkZzYXZlZCUyRm1vZGVsJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQSUwQWNhcHRpb24lMjAlM0QlMjAlMjJBJTIwY3V0ZSUyMGJpcmQlMjBwb2tlbW9uJTIwaG9sZGluZyUyMGElMjBzaGllbGQlMjIlMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZSglMEElMjAlMjAlMjAlMjBjYXB0aW9uJTJDJTIwJTBBJTIwJTIwJTIwJTIwd2lkdGglM0QxMDI0JTJDJTBBJTIwJTIwJTIwJTIwaGVpZ2h0JTNEMTUzNiUyQyUwQSUyMCUyMCUyMCUyMHByaW9yX3RpbWVzdGVwcyUzRERFRkFVTFRfU1RBR0VfQ19USU1FU1RFUFMlMkMlMEElMjAlMjAlMjAlMjBwcmlvcl9ndWlkYW5jZV9zY2FsZSUzRDQuMCUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbWFnZXNfcGVyX3Byb21wdCUzRDIlMkMlMEEpLmltYWdlcw==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">from</span> diffusers.pipelines.wuerstchen <span class="hljs-keyword">import</span> DEFAULT_STAGE_C_TIMESTEPS | |
| pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">"path/to/saved/model"</span>, torch_dtype=torch.float16).to(<span class="hljs-string">"cuda"</span>) | |
| caption = <span class="hljs-string">"A cute bird pokemon holding a shield"</span> | |
| images = pipeline( | |
| caption, | |
| width=<span class="hljs-number">1024</span>, | |
| height=<span class="hljs-number">1536</span>, | |
| prior_timesteps=DEFAULT_STAGE_C_TIMESTEPS, | |
| prior_guidance_scale=<span class="hljs-number">4.0</span>, | |
| num_images_per_prompt=<span class="hljs-number">2</span>, | |
| ).images`}}),ge=new Ie({}),{c(){o=s("meta"),_=a(),c=s("h1"),b=s("a"),Ue=s("span"),u(B.$$.fragment),xt=a(),Te=s("span"),Te.textContent=Bt,Be=a(),R=s("p"),R.innerHTML=Rt,Re=a(),A=s("p"),A.innerHTML=At,Ae=a(),E=s("p"),E.innerHTML=Et,Ee=a(),G=s("p"),G.textContent=Gt,Ge=a(),u(V.$$.fragment),Ve=a(),N=s("p"),N.textContent=Vt,Ne=a(),u(F.$$.fragment),Fe=a(),u(x.$$.fragment),He=a(),H=s("p"),H.textContent=Nt,Ye=a(),u(Y.$$.fragment),Qe=a(),Q=s("p"),Q.textContent=Ft,Le=a(),u(L.$$.fragment),Se=a(),S=s("p"),S.textContent=Ht,ze=a(),u(z.$$.fragment),qe=a(),q=s("p"),q.innerHTML=Yt,Pe=a(),u(Z.$$.fragment),De=a(),J=s("h2"),W=s("a"),xe=s("span"),u(P.$$.fragment),Zt=a(),Je=s("span"),Je.textContent=Qt,Ke=a(),D=s("p"),D.innerHTML=Lt,Oe=a(),K=s("p"),K.innerHTML=St,et=a(),u(O.$$.fragment),tt=a(),ee=s("p"),ee.innerHTML=zt,lt=a(),v=s("h2"),k=s("a"),Ze=s("span"),u(te.$$.fragment),Wt=a(),ve=s("span"),ve.textContent=qt,nt=a(),le=s("p"),le.innerHTML=Pt,at=a(),ne=s("p"),ne.innerHTML=Dt,it=a(),u(ae.$$.fragment),st=a(),ie=s("p"),ie.innerHTML=Kt,rt=a(),u(se.$$.fragment),ot=a(),re=s("p"),re.innerHTML=Ot,pt=a(),u(oe.$$.fragment),ct=a(),pe=s("p"),pe.innerHTML=el,ht=a(),u(ce.$$.fragment),mt=a(),he=s("p"),he.innerHTML=tl,ut=a(),$=s("h2"),C=s("a"),We=s("span"),u(me.$$.fragment),kt=a(),$e=s("span"),$e.textContent=ll,dt=a(),ue=s("p"),ue.textContent=nl,ft=a(),de=s("p"),de.innerHTML=al,Mt=a(),u(X.$$.fragment),yt=a(),u(fe.$$.fragment),gt=a(),Me=s("p"),Me.textContent=il,wt=a(),u(ye.$$.fragment),bt=a(),j=s("h2"),I=s("a"),ke=s("span"),u(ge.$$.fragment),Ct=a(),je=s("span"),je.textContent=sl,_t=a(),we=s("p"),we.textContent=rl,Tt=a(),be=s("ul"),be.innerHTML=ol,this.h()},l(e){const t=_l("svelte-1phssyn",document.head);o=r(t,"META",{name:!0,content:!0}),t.forEach(l),_=i(e),c=r(e,"H1",{class:!0});var _e=w(c);b=r(_e,"A",{id:!0,class:!0,href:!0});var Ce=w(b);Ue=r(Ce,"SPAN",{});var Xe=w(Ue);d(B.$$.fragment,Xe),Xe.forEach(l),Ce.forEach(l),xt=i(_e),Te=r(_e,"SPAN",{"data-svelte-h":!0}),p(Te)!=="svelte-1v12mxh"&&(Te.textContent=Bt),_e.forEach(l),Be=i(e),R=r(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-i7ckto"&&(R.innerHTML=Rt),Re=i(e),A=r(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-1ogrf3c"&&(A.innerHTML=At),Ae=i(e),E=r(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-19e0b6t"&&(E.innerHTML=Et),Ee=i(e),G=r(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-l7dm2q"&&(G.textContent=Gt),Ge=i(e),d(V.$$.fragment,e),Ve=i(e),N=r(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-z4z0b9"&&(N.textContent=Vt),Ne=i(e),d(F.$$.fragment,e),Fe=i(e),d(x.$$.fragment,e),He=i(e),H=r(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-60q53m"&&(H.textContent=Nt),Ye=i(e),d(Y.$$.fragment,e),Qe=i(e),Q=r(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-di6juu"&&(Q.textContent=Ft),Le=i(e),d(L.$$.fragment,e),Se=i(e),S=r(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-tsz4qp"&&(S.textContent=Ht),ze=i(e),d(z.$$.fragment,e),qe=i(e),q=r(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-1fkfdql"&&(q.innerHTML=Yt),Pe=i(e),d(Z.$$.fragment,e),De=i(e),J=r(e,"H2",{class:!0});var vt=w(J);W=r(vt,"A",{id:!0,class:!0,href:!0});var pl=w(W);xe=r(pl,"SPAN",{});var cl=w(xe);d(P.$$.fragment,cl),cl.forEach(l),pl.forEach(l),Zt=i(vt),Je=r(vt,"SPAN",{"data-svelte-h":!0}),p(Je)!=="svelte-r00uw2"&&(Je.textContent=Qt),vt.forEach(l),Ke=i(e),D=r(e,"P",{"data-svelte-h":!0}),p(D)!=="svelte-5hssf5"&&(D.innerHTML=Lt),Oe=i(e),K=r(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-1r0bv1x"&&(K.innerHTML=St),et=i(e),d(O.$$.fragment,e),tt=i(e),ee=r(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-94nkgl"&&(ee.innerHTML=zt),lt=i(e),v=r(e,"H2",{class:!0});var $t=w(v);k=r($t,"A",{id:!0,class:!0,href:!0});var hl=w(k);Ze=r(hl,"SPAN",{});var ml=w(Ze);d(te.$$.fragment,ml),ml.forEach(l),hl.forEach(l),Wt=i($t),ve=r($t,"SPAN",{"data-svelte-h":!0}),p(ve)!=="svelte-339bde"&&(ve.textContent=qt),$t.forEach(l),nt=i(e),le=r(e,"P",{"data-svelte-h":!0}),p(le)!=="svelte-1qezx8a"&&(le.innerHTML=Pt),at=i(e),ne=r(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1dwkzrk"&&(ne.innerHTML=Dt),it=i(e),d(ae.$$.fragment,e),st=i(e),ie=r(e,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-1q4frxg"&&(ie.innerHTML=Kt),rt=i(e),d(se.$$.fragment,e),ot=i(e),re=r(e,"P",{"data-svelte-h":!0}),p(re)!=="svelte-hccx6h"&&(re.innerHTML=Ot),pt=i(e),d(oe.$$.fragment,e),ct=i(e),pe=r(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-1mgnmwn"&&(pe.innerHTML=el),ht=i(e),d(ce.$$.fragment,e),mt=i(e),he=r(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-6gmbd2"&&(he.innerHTML=tl),ut=i(e),$=r(e,"H2",{class:!0});var jt=w($);C=r(jt,"A",{id:!0,class:!0,href:!0});var ul=w(C);We=r(ul,"SPAN",{});var dl=w(We);d(me.$$.fragment,dl),dl.forEach(l),ul.forEach(l),kt=i(jt),$e=r(jt,"SPAN",{"data-svelte-h":!0}),p($e)!=="svelte-zp6p5k"&&($e.textContent=ll),jt.forEach(l),dt=i(e),ue=r(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-9dei1q"&&(ue.textContent=nl),ft=i(e),de=r(e,"P",{"data-svelte-h":!0}),p(de)!=="svelte-6q7ycx"&&(de.innerHTML=al),Mt=i(e),d(X.$$.fragment,e),yt=i(e),d(fe.$$.fragment,e),gt=i(e),Me=r(e,"P",{"data-svelte-h":!0}),p(Me)!=="svelte-1x6in5t"&&(Me.textContent=il),wt=i(e),d(ye.$$.fragment,e),bt=i(e),j=r(e,"H2",{class:!0});var Ut=w(j);I=r(Ut,"A",{id:!0,class:!0,href:!0});var fl=w(I);ke=r(fl,"SPAN",{});var Ml=w(ke);d(ge.$$.fragment,Ml),Ml.forEach(l),fl.forEach(l),Ct=i(Ut),je=r(Ut,"SPAN",{"data-svelte-h":!0}),p(je)!=="svelte-pr7lub"&&(je.textContent=sl),Ut.forEach(l),_t=i(e),we=r(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-1o0am8e"&&(we.textContent=rl),Tt=i(e),be=r(e,"UL",{"data-svelte-h":!0}),p(be)!=="svelte-m7qkni"&&(be.innerHTML=ol),this.h()},h(){h(o,"name","hf:doc:metadata"),h(o,"content",JSON.stringify(jl)),h(b,"id","wuerstchen"),h(b,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(b,"href","#wuerstchen"),h(c,"class","relative group"),h(W,"id","script-parameters"),h(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(W,"href","#script-parameters"),h(J,"class","relative group"),h(k,"id","training-script"),h(k,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(k,"href","#training-script"),h(v,"class","relative group"),h(C,"id","launch-the-script"),h(C,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(C,"href","#launch-the-script"),h($,"class","relative group"),h(I,"id","next-steps"),h(I,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(I,"href","#next-steps"),h(j,"class","relative group")},m(e,t){m(document.head,o),n(e,_,t),n(e,c,t),m(c,b),m(b,Ue),f(B,Ue,null),m(c,xt),m(c,Te),n(e,Be,t),n(e,R,t),n(e,Re,t),n(e,A,t),n(e,Ae,t),n(e,E,t),n(e,Ee,t),n(e,G,t),n(e,Ge,t),f(V,e,t),n(e,Ve,t),n(e,N,t),n(e,Ne,t),f(F,e,t),n(e,Fe,t),f(x,e,t),n(e,He,t),n(e,H,t),n(e,Ye,t),f(Y,e,t),n(e,Qe,t),n(e,Q,t),n(e,Le,t),f(L,e,t),n(e,Se,t),n(e,S,t),n(e,ze,t),f(z,e,t),n(e,qe,t),n(e,q,t),n(e,Pe,t),f(Z,e,t),n(e,De,t),n(e,J,t),m(J,W),m(W,xe),f(P,xe,null),m(J,Zt),m(J,Je),n(e,Ke,t),n(e,D,t),n(e,Oe,t),n(e,K,t),n(e,et,t),f(O,e,t),n(e,tt,t),n(e,ee,t),n(e,lt,t),n(e,v,t),m(v,k),m(k,Ze),f(te,Ze,null),m(v,Wt),m(v,ve),n(e,nt,t),n(e,le,t),n(e,at,t),n(e,ne,t),n(e,it,t),f(ae,e,t),n(e,st,t),n(e,ie,t),n(e,rt,t),f(se,e,t),n(e,ot,t),n(e,re,t),n(e,pt,t),f(oe,e,t),n(e,ct,t),n(e,pe,t),n(e,ht,t),f(ce,e,t),n(e,mt,t),n(e,he,t),n(e,ut,t),n(e,$,t),m($,C),m(C,We),f(me,We,null),m($,kt),m($,$e),n(e,dt,t),n(e,ue,t),n(e,ft,t),n(e,de,t),n(e,Mt,t),f(X,e,t),n(e,yt,t),f(fe,e,t),n(e,gt,t),n(e,Me,t),n(e,wt,t),f(ye,e,t),n(e,bt,t),n(e,j,t),m(j,I),m(I,ke),f(ge,ke,null),m(j,Ct),m(j,je),n(e,_t,t),n(e,we,t),n(e,Tt,t),n(e,be,t),Jt=!0},p(e,[t]){const _e={};t&2&&(_e.$$scope={dirty:t,ctx:e}),x.$set(_e);const Ce={};t&2&&(Ce.$$scope={dirty:t,ctx:e}),Z.$set(Ce);const Xe={};t&2&&(Xe.$$scope={dirty:t,ctx:e}),X.$set(Xe)},i(e){Jt||(M(B.$$.fragment,e),M(V.$$.fragment,e),M(F.$$.fragment,e),M(x.$$.fragment,e),M(Y.$$.fragment,e),M(L.$$.fragment,e),M(z.$$.fragment,e),M(Z.$$.fragment,e),M(P.$$.fragment,e),M(O.$$.fragment,e),M(te.$$.fragment,e),M(ae.$$.fragment,e),M(se.$$.fragment,e),M(oe.$$.fragment,e),M(ce.$$.fragment,e),M(me.$$.fragment,e),M(X.$$.fragment,e),M(fe.$$.fragment,e),M(ye.$$.fragment,e),M(ge.$$.fragment,e),Jt=!0)},o(e){y(B.$$.fragment,e),y(V.$$.fragment,e),y(F.$$.fragment,e),y(x.$$.fragment,e),y(Y.$$.fragment,e),y(L.$$.fragment,e),y(z.$$.fragment,e),y(Z.$$.fragment,e),y(P.$$.fragment,e),y(O.$$.fragment,e),y(te.$$.fragment,e),y(ae.$$.fragment,e),y(se.$$.fragment,e),y(oe.$$.fragment,e),y(ce.$$.fragment,e),y(me.$$.fragment,e),y(X.$$.fragment,e),y(fe.$$.fragment,e),y(ye.$$.fragment,e),y(ge.$$.fragment,e),Jt=!1},d(e){e&&(l(_),l(c),l(Be),l(R),l(Re),l(A),l(Ae),l(E),l(Ee),l(G),l(Ge),l(Ve),l(N),l(Ne),l(Fe),l(He),l(H),l(Ye),l(Qe),l(Q),l(Le),l(Se),l(S),l(ze),l(qe),l(q),l(Pe),l(De),l(J),l(Ke),l(D),l(Oe),l(K),l(et),l(tt),l(ee),l(lt),l(v),l(nt),l(le),l(at),l(ne),l(it),l(st),l(ie),l(rt),l(ot),l(re),l(pt),l(ct),l(pe),l(ht),l(mt),l(he),l(ut),l($),l(dt),l(ue),l(ft),l(de),l(Mt),l(yt),l(gt),l(Me),l(wt),l(bt),l(j),l(_t),l(we),l(Tt),l(be)),l(o),g(B),g(V,e),g(F,e),g(x,e),g(Y,e),g(L,e),g(z,e),g(Z,e),g(P),g(O,e),g(te),g(ae,e),g(se,e),g(oe,e),g(ce,e),g(me),g(X,e),g(fe,e),g(ye,e),g(ge)}}}const jl={local:"wuerstchen",sections:[{local:"script-parameters",title:"Script parameters"},{local:"training-script",title:"Training script"},{local:"launch-the-script",title:"Launch the script"},{local:"next-steps",title:"Next steps"}],title:"Wuerstchen"};function Ul(U){return gl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xl extends wl{constructor(o){super(),bl(this,o,Ul,$l,yl,{})}}export{Xl as component}; | |
Xet Storage Details
- Size:
- 27.1 kB
- Xet hash:
- f16336afaef486dd7b4355770021491e3479da678b6e51b9a3cbc751544326e7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.