huggingface / huggingface/diffusers
Why does calculate_dimensions in qwen-image-edit require image height/width to be multiples of 32?
- Lenguaje dominante
- Python
- Estrellas
- 34.5k
- Forks
- 7.3k
- Merge medio
- 3 d 3 h
- PR fusionados (30 d)
- 91
Descripción
Hi, thanks for the great work!
I have a question regarding the logic in calculate_dimensions.
Currently, the image height and width are constrained to be multiples of 32.
From my understanding:
The VAE has a downsampling factor of 8, so the latent spatial size should require the input dimensions to be multiples of 8.
Before entering the DiT, the latent is passed through a Patch Embedding layer with patch_size = 2.
That would further imply a total factor of 8 × 2 = 16.
Based on this, it seems that constraining the image dimensions to be multiples of 16 should already be sufficient.
Could you clarify why a multiple of 32 is required here?
Is there an additional downsampling stage, architectural constraint, or implementation detail that I might be missing?
Thanks in advance for the clarification!
Guía de contribución
Línea de trabajo
Empieza por localizar calculate_dimensions en qwen-image-edit y seguir las etapas VAE, latent, DiT y Patch Embedding mencionadas en el issue. Comprueba si alguna restricción arquitectónica o de implementación adicional explica el requisito de que las dimensiones sean múltiplos de 32. Se considera completado cuando se documente una explicación clara de la restricción, incluido si los múltiplos de 16 son suficientes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python, pytorch
- Área
- machine-learning
- Tipo de issue
- Documentación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100