ai-forever / ai-forever/ru-dalle

Generation Stuck at 0% with Emojich Model

Abierto
#137 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Jupyter Notebook
Estrellas
1.6k
Forks
242
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When running the emoji generation script with the Emojich model, the process gets stuck at 0% and does not progress. The model initializes correctly but doesn’t generate any images.

**Environment** :
OS: Windows
Python Version: [v3.10.10]
pip Version: 24.2
rudalle Version: 1.1.3
torch Version: 2.4.0
tokenizers Version : 0.10.3

**My script** :
```python
from rudalle.pipelines import generate_images, show
from rudalle import get_rudalle_model, get_tokenizer, get_vae
from rudalle.utils import seed_everything
import torch

device = 'cuda' if torch.cuda.is_available() else 'cpu'
fp16 = torch.cuda.is_available()

try:
dalle = get_rudalle_model('Emojich', pretrained=True, fp16=fp16, device=device)
except RuntimeError as e:
if 'Attempting to deserialize object on a CUDA device' in str(e):
dalle = get_rudalle_model('Emojich', pretrained=True, fp16=False, device='cpu')
else:
raise

tokenizer = get_tokenizer()
vae = get_vae(dwt=True).to(device)

text = 'Дональд Трамп из лего' # Donald Trump made of LEGO

seed_everything(42)

pil_images = []

try:
for top_k, top_p, images_num in [
(2048, 0.9, 4),
]:
images, _ = generate_images(text, tokenizer, dalle, vae, top_k=top_k, images_num=images_num, top_p=top_p, bs=8)
pil_images.extend(images)
except Exception as e:
print(f"An error occurred: {e}")

if pil_images:
show(pil_images, 4)
else:
print("No images to display.")
```

Error Messages :
```
Using device: cpu
...
Generating images with top_k=256, top_p=0.9, images_num=4
0%|
```

Feel free to adjust any details as needed!
Thanks

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.