Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] ChatGLMTokenizer special token property getters and setters are broken

Open Beginner friendly
#14,291 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python, pytorch

Research direction

Open src/diffusers/pipelines/kolors/tokenizer.py and inspect ChatGLMTokenizer's pad_token, unk_token, and eos_token properties. Reproduce the reported default values and assignments such as tokenizer.pad_token = "<custom_pad>". Done means the getters return the correct defaults and reflect values assigned through their setters.

Written by the indexing model from the issue text.

Description

Describe the bug

In ChatGLMTokenizer (src/diffusers/pipelines/kolors/tokenizer.py), the property getters for pad_token, unk_token, and eos_token hardcode return values (e.g. pad_token returns "<unk>" instead of "<pad>"). Furthermore, assigning new special token values (e.g. tokenizer.pad_token = "<custom_pad>") has no effect on the property getter because the custom setters update private attributes (_pad_token) while the getters ignore them or use hardcoded strings.

Reproduction
from diffusers.pipelines.kolors import ChatGLMTokenizer

# Instantiating ChatGLMTokenizer or viewing properties
# tokenizer.pad_token returns '<unk>' instead of '<pad>'
# Setting tokenizer.pad_token = '<custom_pad>' does not update tokenizer.pad_token
System Info
  • Diffusers version: 0.36.0.dev0
  • Python version: 3.11
  • PyTorch version: 2.x
Who can help?

@yiyixuxu @asomoza @DN6

Dominant language
Python
Stars
34.6k
Forks
7.4k
Avg merge
3d 12h
Merged PRs (30d)
76

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from huggingface/diffusers

All issues in huggingface/diffusers

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.