Skip to content

Fix the the type cast error, issue #214#217

Closed
ruanqizhen wants to merge 2 commits intomicrosoft:masterfrom
ruanqizhen:master
Closed

Fix the the type cast error, issue #214#217
ruanqizhen wants to merge 2 commits intomicrosoft:masterfrom
ruanqizhen:master

Conversation

@ruanqizhen
Copy link
Copy Markdown

@ruanqizhen ruanqizhen commented Jan 6, 2022

Without the change, there will be an error: numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'

Without the change, there will be an error:  numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'
@qcasey
Copy link
Copy Markdown

qcasey commented Jan 7, 2022

This same fix worked when using --HR if the change is also made here

def blur_blending_cv2(im1, im2, mask):
mask *= 255.0

@ghost
Copy link
Copy Markdown

ghost commented Jan 7, 2022

CLA assistant check
All CLA requirements met.

jensanjo added a commit to jensanjo/Bringing-Old-Photos-Back-to-Life that referenced this pull request Jan 18, 2022
@the-c0d3br34k3r
Copy link
Copy Markdown

A better way is to use the numpy functions to explicitly specify an unsafe cast.
This will ensure that change in the operator support will not affect the behaviour.
numpy/numpy#7225 (comment)

@CodeMadUser
Copy link
Copy Markdown

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

1 similar comment
@CodeMadUser
Copy link
Copy Markdown

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

@ruanqizhen ruanqizhen closed this by deleting the head repository Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants