Run this model with HF Jobs

Run CompVis/stable-diffusion-v1-4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/CompVis/stable-diffusion-v1-4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/CompVis/stable-diffusion-v1-4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

AttributeError: 'AutoencoderKLOutput' object has no attribute 'sample'

#235
by Nobparad - opened

How to fix this
Screenshot 2023-10-26 045647.jpg

Traceback (most recent call last):
File "C:\Users\HP.conda\envs\ldm\lib\tkinter_init_.py", line 1883, in call
return self.func(*args)
File "scripts/draw.py", line 48, in save
out = self.model([self.prompt_input.get(1.0, "end-1c")], init_image=drawn_img)["sample"][0]
File "C:\Users\HP.conda\envs\ldm\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\HP\Downloads\stable-diffusion-draw-main\scripts\diffusion_img2img.py", line 88, in call
init_latents = self.vae.encode(init_image.to(self.device))[0].sample()
AttributeError: 'AutoencoderKLOutput' object has no attribute 'sample'

Sign up or log in to comment