Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

fix diffusers undefined REFINER_ID #76

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

biswaroop1547
Copy link
Collaborator

@biswaroop1547 biswaroop1547 commented Jul 28, 2023

fixes #71

@@ -11,7 +11,7 @@ RUN pip3 install --no-cache-dir -r requirements.txt

COPY download.py .

RUN python3 download.py --model $MODEL_ID --refiner $REFINER_ID
RUN python3 download.py --model $MODEL_ID
Copy link
Contributor

@casperdcl casperdcl Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only change required, the rest can be reverted? i.e. pass empty string if not defined :)

Suggested change
RUN python3 download.py --model $MODEL_ID
RUN python3 download.py --model $MODEL_ID --refiner "$REFINER_ID"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@casperdcl then for this image build REFINER_ID won't be used correctly by download.py to download refiner only when given. Whereas it'll work for all the other image builds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait I totally missed that you've put REFINER_ID inside quotes, my bad! damn this totally works then

Copy link
Contributor

@casperdcl casperdcl Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just pushed a commit (might make it clearer what I mean) - feel free to revert it if it doesn't make sense or doesn't work though. Basically:

  • no --build-arg
    • Dockerfile executes download.py --refiner ""
      • argparse parses into args.refiner = "" (Falsey)
  • using --build-arg="REFINER_ID=..."
    • Dockerfile executes download.py --refiner "..."
      • argparse parses into args.refiner = "..."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the explanation! this makes sense, just tried locally and seems to be working nicely.

@casperdcl casperdcl added the bug Something isn't working label Jul 28, 2023
@casperdcl casperdcl merged commit 1389b82 into premAI-io:main Jul 28, 2023
3 checks passed
@casperdcl casperdcl changed the title fix: #71 by making REFINER_ID env variable for diffusers fix diffusers undefined REFINER_ID Jul 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix dfs-diffusers
2 participants