bytedance / DEADiff

[CVPR 2024] Official implementation of "DEADiff: An Efficient Stylization Diffusion Model with Disentangled Representations"
Apache License 2.0
190 stars 4 forks source link

UnboundLocalError: local variable 'uc_encoder_hidden_states' referenced before assignment #3

Open loboere opened 3 months ago

loboere commented 3 months ago

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ in :29 │ │ │ │ 26 # Redimensionar la imagen │ │ 27 imagen_redimensionada = cv2.resize(imagen, (nueva_ancho, nueva_altura)) │ │ 28 │ │ ❱ 29 img=inference.generate( │ │ 30 │ "santa claus", │ │ 31 │ image_input=imagen_redimensionada , #nueva_imagen, │ │ 32 │ subject_text="style", #["None", "style", "content", "style & content"] │ │ │ │ in generate:120 │ │ │ │ 117 │ │ │ │ │ │ │ 'inp_image': 2(T.ToTensor()(Image.fromarray(image_input).co │ │ 118 │ │ │ │ │ │ │ 'subject_text': [subject_text]batch_size, │ │ 119 │ │ │ │ │ │ }) │ │ ❱ 120 │ │ │ │ │ uc, c = uc_encoder_hidden_states, c_encoder_hidden_states │ │ 121 │ │ │ │ │ │ │ 122 │ │ │ │ │ shape = [4, 64, 64] │ │ 123 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ UnboundLocalError: local variable 'uc_encoder_hidden_states' referenced before assignment

Tianhao-Qi commented 2 months ago

Whether you set the hyper-parameter 'scale' to 1.0? If yes, please change it to another value.