finegrain-ai / refiners

A microframework on top of PyTorch with first-class citizen APIs for foundation model adaptation
https://refine.rs
MIT License
584 stars 43 forks source link

⭐ Add example code for Stable Diffusion(1.5) #409

Closed kadirnar closed 1 week ago

kadirnar commented 2 weeks ago

There is no documentation for Stable Diffusion(1.5). I have added an example code for this. Is there anything else you would like me to add?

kadirnar commented 2 weeks ago

How do I solve this error?

pip install pyright
rye run pyright

Error Message:

error: invalid or unknown script 'pyright' 
catwell commented 2 weeks ago

How do I solve this error?

pip install pyright
rye run pyright

Error Message:

error: invalid or unknown script 'pyright' 

You are installing pyright with pip and then trying to use it with Rye, it will not work.

If you use rye, install pyright with rye (it does it automatically when you run rye sync --all-features). If you use pip, just run pyright and not rye run pyright.

kadirnar commented 2 weeks ago

I ran this code and there was no change. Can you review it again?

rye run pyright
catwell commented 1 week ago

@kadirnar Can you squash all the commits into the first one?

I'd do it but with the way this repository is configured I cannot for external PRs like this one (because the main branch is protected and squash in the Git UI is disabled).

One way to do it is with interactive rebase, i.e. run git rebase -i HEAD~10 and turn the last 5 commits into fixups like in the screenshot below, then force push to the branch.

Screenshot from 2024-08-31 11-25-25

kadirnar commented 1 week ago

I rolled back the previous commits and fixed them manually. Can you check?

catwell commented 1 week ago

It's merged, thanks!