lllyasviel / lllyasviel/ControlNet
Fix loading json in tutorial_datdaset.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.1k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi
Thanks for your great repo.
Here is how to save the json
```python
with open(prompt_json_path, "w") as prompt_file:
json.dump(prompt_data, prompt_file)
```
Here is how to load it
```python
with open(prompt_json_path, "r") as prompt_file:
data = json.loads(prompt_file.read())
```
How its done on tutorial_dataset.py is:
```python
with open(json_file, 'rt') as f:
for line in f:
self.data.append(json.loads(line))
```
Please fix this.
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read tutorial_dataset.py and compare its JSON loading with the save and load examples in the issue. Align the loader with the JSON format used by the tutorial, then verify that the tutorial dataset loads successfully without parsing errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100